Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/20687#discussion_r172985682 --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/complexTypesSuite.scala --- @@ -331,4 +330,30 @@ class ComplexTypesSuite extends PlanTest with ExpressionEvalHelper { .analyze comparePlans(Optimizer execute rel, expected) } + + test("SPARK-23500: Simplify complex ops that aren't at the plan root") { + // If nullable attributes aren't used, the array and map test cases fail because array + // and map indexing can return null so the output is marked nullable. --- End diff -- why? I think the optimization is still valid, we should show this in the test, instead of hiding it with a nullable attribute.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org