[ https://issues.apache.org/jira/browse/SPARK-31553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17096068#comment-17096068 ]
Apache Spark commented on SPARK-31553: -------------------------------------- User 'MaxGekk' has created a pull request for this issue: https://github.com/apache/spark/pull/28405 > Wrong result of isInCollection for large collections > ---------------------------------------------------- > > Key: SPARK-31553 > URL: https://issues.apache.org/jira/browse/SPARK-31553 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 3.0.0, 3.1.0 > Reporter: Maxim Gekk > Assignee: Maxim Gekk > Priority: Major > Labels: correctness > Fix For: 3.0.0 > > > If the size of a collection passed to isInCollection is bigger than > spark.sql.optimizer.inSetConversionThreshold, the method can return wrong > results for some inputs. For example: > {code:scala} > val set = (0 to 20).map(_.toString).toSet > val data = Seq("1").toDF("x") > println(set.contains("1")) > data.select($"x".isInCollection(set).as("isInCollection")).show() > {code} > {code} > true > +--------------+ > |isInCollection| > +--------------+ > | false| > +--------------+ > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org