cloud-fan commented on a change in pull request #24525: [SPARK-27633][SQL]
Remove redundant aliases in NestedColumnAliasing
URL: https://github.com/apache/spark/pull/24525#discussion_r285869987
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/NestedColumnAliasingSuite.scala
##########
@@ -221,6 +221,42 @@ class NestedColumnAliasingSuite extends SchemaPruningTest
{
comparePlans(optimized, expected)
}
+ test("Do not generate redundant aliases if parent nested field is aliased
too") {
+ val nestedRelation = LocalRelation('a.struct('b.struct('c.int,
+ 'd.struct('f.int, 'g.int), 'e.int)))
+
+ val first = GetStructField('a, 0, Some("b"))
Review comment:
can we use expression DSL to write tests?
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]