adriangb commented on PR #27777: URL: https://github.com/apache/datafusion/pull/27777#issuecomment-7305374310
FWIW this predates https://github.com/apache/datafusion/pull/25455. This query has the no struct fields and had unnecessary projections before that PR: ```sql COPY (SELECT value AS timestamp, value * 3 AS period, value * 7 AS val FROM range(0, 10)) TO 'test.parquet' STORED AS PARQUET; SET datafusion.execution.target_partitions = 4; SET datafusion.execution.parquet.pushdown_filters = true; CREATE EXTERNAL TABLE t STORED AS PARQUET LOCATION 'test.parquet'; EXPLAIN SELECT val * period AS result FROM t WHERE timestamp >= 0; ``` ``` +---------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | plan_type | plan | +---------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | logical_plan | Projection: t.val * t.period AS result | | | Filter: t.timestamp >= Int64(0) | | | TableScan: t projection=[timestamp, period, val], partial_filters=[t.timestamp >= Int64(0)] | | physical_plan | ProjectionExec: expr=[val@2 * period@1 as result] | | | RepartitionExec: partitioning=RoundRobinBatch(4), input_partitions=1, maintains_sort_order=true | | | DataSourceExec: file_groups={1 group: [[test.parquet]]}, projection=[timestamp, period, val], output_ordering=[timestamp@0 ASC NULLS LAST], file_type=parquet, predicate=timestamp@0 >= 0, pruning_predicate=timestamp_null_count@1 != row_count@2 AND timestamp_max@0 >= 0, required_guarantees=[] | | | | +---------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 2 row(s) fetched. Elapsed 0.002 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]
