Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/11208#discussion_r52958896
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
---
@@ -362,12 +362,26 @@ class Analyzer(
exprs.flatMap {
case s: Star => s.expand(child, resolver)
case e =>
- e.transformDown {
+ e.transformUp {
+ // ResolveFunctions can handle the case when the number of
variables is not valid
case f1: UnresolvedFunction if containsStar(f1.children) =>
f1.copy(children = f1.children.flatMap {
case s: Star => s.expand(child, resolver)
case o => o :: Nil
})
+ case c: CreateStruct if containsStar(c.children) =>
+ c.copy(children = c.children.flatMap {
+ case s: Star => s.expand(child, resolver)
+ case o => o :: Nil
+ })
+ case c: CreateStructUnsafe if containsStar(c.children) =>
--- End diff --
I saw it is being used in two parts in Analyzer. Will remove them. Thanks!
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]