Github user ueshin commented on a diff in the pull request: https://github.com/apache/spark/pull/21581#discussion_r196707308 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/functions.scala --- @@ -3082,7 +3082,10 @@ object functions { * @since 1.5.0 */ def array_contains(column: Column, value: Any): Column = withExpr { - ArrayContains(column.expr, Literal(value)) + value match { --- End diff -- @chongguang I mean, use just `ArrayContains(column.expr, lit(value).expr)` instead of `value match { ...`. The `lit()` should handle literals and columns well.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org