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 2020/09/10 18:42:50 UTC

[GitHub] [spark] hvanhovell commented on a change in pull request #29661: [SPARK-32811][SQL] optimize IN predicate against continuous range

hvanhovell commented on a change in pull request #29661:
URL: https://github.com/apache/spark/pull/29661#discussion_r486559650



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala
##########
@@ -249,6 +280,10 @@ object OptimizeIn extends Rule[LogicalPlan] {
           && !v.isInstanceOf[CreateNamedStruct]
           && !newList.head.isInstanceOf[CreateNamedStruct]) {
           EqualTo(v, newList.head)
+        } else if (isInteger(v) && isContinousIntegers(newList.toSet)) {

Review comment:
       Should the number of elements in the list at least be 3?




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

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