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/29 23:35:21 UTC

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

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


##########
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:
   I will change back to use equal Or equal if the number of values in the `In` set <=  `pushDownInFilterThreshold`. Only use parquet `In` predicate if the number of values in the `In` set >  `pushDownInFilterThreshold`. The existing tests coverage should be good, just need to change the expected type back to equal Or equal when the number of values in the `In` set <=  `pushDownInFilterThreshold`.



-- 
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