sunchao commented on code in PR #37881: URL: https://github.com/apache/spark/pull/37881#discussion_r972301689
########## sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileSourceStrategy.scala: ########## @@ -186,10 +186,10 @@ object FileSourceStrategy extends Strategy with PredicateHelper with Logging { // Partition keys are not available in the statistics of the files. // `dataColumns` might have partition columns, we need to filter them out. - val dataColumnsWithoutPartitionCols = dataColumns.filterNot(partitionColumns.contains) Review Comment: I think semantically both are the same. In ```scala AttributeSet(dataColumns) -- partitionColumns ``` `partitionColumns` is first wrapped into `AttributeSet` and then compared with `AttributeSet(dataColumns)`. Your version does require one less line of change though :) -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org