Skip to content

Commit 77ae095

Browse files
committed
Revert "fix(table): treat a column selection with no resolvable columns as all columns"
This reverts commit 1b59b12.
1 parent 1b59b12 commit 77ae095

2 files changed

Lines changed: 0 additions & 24 deletions

File tree

‎apps/sim/lib/table/application/rows.test.ts‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -476,27 +476,6 @@ describe('row query and upsert application semantics', () => {
476476
).rejects.toBe(cancelled)
477477
})
478478

479-
it('returns every column when no selected column reference resolves', async () => {
480-
mockQueryRows.mockResolvedValueOnce({
481-
rows: [],
482-
rowCount: 0,
483-
totalCount: null,
484-
nextCursor: null,
485-
})
486-
487-
await queryTableRows.execute({
488-
principal: PRINCIPAL,
489-
input: { tableId: TABLE.id, columns: ['deleted_column'], limit: 10 },
490-
})
491-
492-
expect(mockQueryRows).toHaveBeenCalledWith(
493-
TABLE,
494-
expect.objectContaining({ columnIds: undefined }),
495-
expect.any(String),
496-
undefined
497-
)
498-
})
499-
500479
it('resumes the same offset page under the identical predicate', async () => {
501480
const cursor = encodeCursor({
502481
lastRow: { id: 'row-100', orderKey: null },

‎apps/sim/lib/table/application/rows.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -674,9 +674,6 @@ export const queryTableRows = defineAuthorizedTableUseCase({
674674
)
675675
if (column) columnIds.add(getColumnId(column))
676676
}
677-
// Unknown references are ignored, so a selection naming only deleted columns is an
678-
// empty selection — every column — not rows stripped to an empty `data`.
679-
if (columnIds.size === 0) columnIds = undefined
680677
}
681678
const result = await queryRows(
682679
context.table,

0 commit comments

Comments
 (0)