You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2d5be82
Browse filesBrowse the repository at this point in the historyBrowse files
test(filter-v2): cover the bare boolean predicate where it can actually fail
The fix alone is not a guard. Two places had to gain a case, and neither
was the obvious one.
`bool_filter_echo` is a table function with a nullable BOOLEAN column
(`flag` cycling TRUE, FALSE, NULL) that echoes the SQL rendering of what was
pushed. It exists because nothing else could express the shape:
- `filter_echo` has no boolean column, so `WHERE flag` cannot be written
against it at all.
- The table-in-out `example.echo` path is not handed a bare boolean column
as a pushed predicate. Cases written there pass whether or not the
worker can decode one -- I checked, by reverting the fix and watching
them stay green. A test that cannot fail is worse than no test.
It takes a TABLE FUNCTION with a boolean column to see the shape at all,
which is how a filter-pushdown suite of 348 files -- including one dedicated
to booleans, added to close a boolean coverage gap -- missed a decoder that
refused every `WHERE flag` there is.
Echoing `pushed_filters` covers both halves: the rows prove the decode, and
the rendering proves `to_sql()` emits something. A shape that parses but
renders no SQL reads as "(none)" there, and for a worker that builds a WHERE
clause from it that is silently wrong rows -- DuckDB does not re-apply a
predicate it pushed into a table function.
The conformance corpus gains `structural.boolean-column-predicate`, a
positive case for a bare `column_ref` root and for `not` over one. That is
the cross-port contract, and its absence is why this is not a Python bug so
much as a Python *sighting*: every port's decoder is free to have the same
gap, and none had a case that would say so.
`bool_filter_echo` is excluded from function_registration.test's portable
baseline for now -- counting it would fail every SDK fixture worker that has
not shipped it. It belongs in the baseline (167) once they do.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments