Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/11208#discussion_r52928831
--- 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) =>
--- End diff --
Not sure if we have the other functions that can accept `star` as an input
parameter. If so, I think we need to create a `trait` for all these case
classes. Then, we can remove the duplicate code. Any better idea? 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]