Relationships
#4820 data query --select crashes in log mode when a list projection fails for one record
Opened by zack · 11/16/2026· Shipped 11/17/2026
Reproduction
Query several records with a select expression that yields an array for some records and fails (missing key) for others, without --json. For example: select attributes.items where only some matched records carry items.
Actual behavior
libswamp classifies the projection as shape list from the first non-null value and passes the failed projections through as null rows. renderListTable in src/presentation/renderers/data_query.ts calls row.length and row.map on every row, so log mode throws: TypeError: Cannot read properties of null (reading 'length'). The map shape does not have this problem because libswamp substitutes an empty object for a null row.
Expected behavior
A failed projection renders as an empty row, as the scalar and map shapes already do. JSON mode is unaffected.
Notes
Found while triaging swamp-club#4759, which touches the same renderer but does not change the flat list table path.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.