Github user baibaichen commented on the issue: https://github.com/apache/spark/pull/18725 It's another issue about non-deterministic. When generating SparkPlan in `FileSourceStrategy` , `PhysicalOperation` is used to extract projects and filters on top of relation. But with [SPARK-10316](https://issues.apache.org/jira/browse/SPARK-10316), i.e. [PR#8486](https://github.com/apache/spark/pull/8486), `PhysicalOperation` only works when fields or conditions are deterministic, which is correct for SQL semantics. So, given the such `LogicalPlan`: ``` +- Project [field1#19L, FLOOR((rand(-2126768329595649786) * 10000.0)) AS k#16L] +- Relation[field1#19L,field2#20,field3#21L,field4#22] parquet ``` Spark fails to extract projects and filters on top of parquet, and eventually creates `FileSourceScanExec` base on relation operator, which results in reading all of columns. @cloud-fan any idea about fix? Thanks
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org