dongjoon-hyun commented on a change in pull request #28328:
URL: https://github.com/apache/spark/pull/28328#discussion_r414676622
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/Column.scala
##########
@@ -828,11 +828,11 @@ class Column(val expr: Expression) extends Logging {
* @since 2.4.0
*/
def isInCollection(values: scala.collection.Iterable[_]): Column = withExpr {
- val hSet = values.toSet[Any]
- if (hSet.size > SQLConf.get.optimizerInSetConversionThreshold) {
- InSet(expr, hSet)
+ val exprValues = values.toSeq.map(lit(_).expr)
+ if (exprValues.size > SQLConf.get.optimizerInSetConversionThreshold) {
+ InSet(expr, exprValues.map(_.eval()).toSet)
} else {
- In(expr, values.toSeq.map(lit(_).expr))
+ In(expr, exprValues)
Review comment:
So, this is caused by SPARK-29048 (Improve performance on
Column.isInCollection() with a large size collection,
https://github.com/apache/spark/pull/25754 ) and only affects 3.0.0, right?
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]