adriangb commented on code in PR #18276: URL: https://github.com/apache/datafusion/pull/18276#discussion_r2462168485
########## datafusion/sqllogictest/test_files/parquet.slt: ########## @@ -862,3 +862,30 @@ select part, k, v from t order by k statement ok DROP TABLE t; + +# Regression test for files with stats on some columns and not others +# See https://github.com/apache/datafusion/pull/18276 + +query I +COPY (SELECT 1::int AS a, 2::int as b) +TO 'test_files/scratch/parquet/mixed_stats.parquet' +STORED AS PARQUET OPTIONS ( + 'STATISTICS_ENABLED::b' 'none' +); +---- +1 + +statement ok +CREATE EXTERNAL TABLE t +STORED AS PARQUET +LOCATION 'test_files/scratch/parquet/mixed_stats.parquet'; + +query I +SELECT b +FROM t +WHERE b = 2; +---- +2 Review Comment: On main this outputs 0 rows: ``` ❯ datafusion-cli -f q.sql DataFusion CLI v50.0.0 +-------+ | count | +-------+ | 1 | +-------+ 1 row(s) fetched. Elapsed 0.002 seconds. 0 row(s) fetched. Elapsed 0.001 seconds. +---+ | b | +---+ +---+ 0 row(s) fetched. Elapsed 0.003 seconds. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
