Skip to content

Conversation

patricklucas
Copy link
Contributor

Feel free to adjust.

Closes #464

@Tishj
Copy link
Collaborator

Tishj commented Sep 12, 2025

Thanks for the change, this isn't reviewable or mergable without an accompanying test however

@patricklucas
Copy link
Contributor Author

Added a test (and test table).

On main:

[10/115] (8%): test/sql/local/iceberg_scans/expression_filter.test
1. test/sql/local/iceberg_scans/expression_filter.test:28
================================================================================
Wrong row count in query! (test/sql/local/iceberg_scans/expression_filter.test:28)!
Expected 2 rows, but got 0 rows
================================================================================
SELECT id, CASE WHEN value = 'foo' THEN 'not null' ELSE NULL END AS role FROM my_datalake.default.expression_filter WHERE role IS NULL ORDER BY id ASC;
================================================================================
Expected result:
================================================================================

2	NULL
3	NULL
================================================================================
Actual result:
================================================================================
id	role
BIGINT	VARCHAR
[ Rows: 0]


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
unittest is a Catch v2.13.7 host application.
Run with -? for options

-------------------------------------------------------------------------------
test/sql/local/iceberg_scans/expression_filter.test
-------------------------------------------------------------------------------
/Users/plucas/dev/oss/duckdb-iceberg/duckdb/test/sqlite/test_sqllogictest.cpp:247
...............................................................................

test/sql/local/iceberg_scans/expression_filter.test:28: FAILED:
explicitly with message:
  0

Passes on this branch.

@Tishj
Copy link
Collaborator

Tishj commented Sep 15, 2025

Thanks, looks great!

@Tishj Tishj merged commit a851e52 into duckdb:main Sep 15, 2025
23 checks passed
Mytherin added a commit to duckdb/duckdb that referenced this pull request Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expression table filters do not evaluate expression, erroneously exclude files
2 participants