Github user mgaido91 commented on a diff in the pull request: https://github.com/apache/spark/pull/21045#discussion_r188883572 --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CollectionExpressionsSuite.scala --- @@ -199,6 +200,20 @@ class CollectionExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper Some(Literal.create(null, StringType))), null) } + test("Zip") { + val lit1 = (Literal.create(Seq(9001, 9002, 9003)), Literal.create(Seq(4, 5, 6))) + val lit2 = (Literal.create(Seq(9001, 9002)), Literal.create(Seq(4, 5, 6))) + val lit3 = (Literal.create(Seq("a", "b", null)), Literal.create(Seq(4))) + + val val1 = List(Row(9001, 4), Row(9002, 5), Row(9003, 6)) + val val2 = List(Row(9001, 4), Row(9002, 5), Row(null, 6)) + val val3 = List(Row("a", 4), Row("b", null), Row(null, null)) + + checkEvaluation(Zip(Seq(lit1._1, lit1._2)), val1) + checkEvaluation(Zip(Seq(lit2._1, lit2._2)), val2) + checkEvaluation(Zip(Seq(lit3._1, lit3._2)), val3) --- End diff -- can we also add some tests with different datatypes like `Binary`, etc. etc.?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org