You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/05/27 08:43:48 UTC

[GitHub] [spark] wangyum commented on a diff in pull request #36696: [SPARK-39312][SQL] Use parquet native In predicate for in filter push down

wangyum commented on code in PR #36696:
URL: https://github.com/apache/spark/pull/36696#discussion_r883404190


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilters.scala:
##########
@@ -725,26 +757,8 @@ class ParquetFilters(
 
       case sources.In(name, values) if pushDownInFilterThreshold > 0 && values.nonEmpty &&
           canMakeFilterOn(name, values.head) =>
-        val fieldType = nameToParquetField(name).fieldType
-        val fieldNames = nameToParquetField(name).fieldNames
-        if (values.length <= pushDownInFilterThreshold) {
-          values.distinct.flatMap { v =>
-            makeEq.lift(fieldType).map(_(fieldNames, v))
-          }.reduceLeftOption(FilterApi.or)

Review Comment:
   It seems a regression, For example:
   ```
   In(id, 1, 3, 5, 100000)
   ```
   
   Before this PR, the pushded predicate is: id = 1 or id = 3 or id = 5 or id = 100000,
   the current pushded predicate is: id >= 1 and id <= 100000



-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org