Github user dilipbiswal commented on the pull request:
https://github.com/apache/spark/pull/9981#issuecomment-160877804
@cloud-fan Hi Wenchen, I was thinking about this and want to run an idea by
you. Is it ok if we add the logic to inject the MultiAlias in our analyzer. As
an experiment, i put the following code in ResolveGenerate() and it seems to
work and also i am running the test suites to make sure.
val newProj : Seq[NamedExpression] = projectList.map { expr =>
expr match {
case a @ Alias(g: Generator, name) if g.resolved &&
g.elementTypes.size > 1 && name.equals(a.child.prettyString)
=>
MultiAlias(g, Nil)
case e @ _ => e
}
}
One thing is name.equals(a.child.prettyString) does not really make sure if
its an user specified alias or a system generated one. We can flag an alias to
differentiate if required. Just wanted to know what you thought about this
approach. Thanks in advance.
---
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]