You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by dilipbiswal <gi...@git.apache.org> on 2015/12/01 07:59:14 UTC
[GitHub] spark pull request: [SPARK-11619][SQL] cannot use UDTF in DataFram...
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org