Github user chenghao-intel commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4186#discussion_r23509410
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveUdfs.scala 
---
    @@ -321,6 +323,18 @@ private[hive] case class HiveGenericUdtf(
       override def toString = 
s"$nodeName#${funcWrapper.functionClassName}(${children.mkString(",")})"
     }
     
    +/**
    + * Resolve Udtfs Alias.
    + */
    +private[spark] object ResolveUdtfsAlias extends Rule[LogicalPlan] {
    +  def apply(plan: LogicalPlan) = plan transform {
    +    case q: LogicalPlan => q transformExpressions {
    +      case Alias(udtf@HiveGenericUdtf(_, _, _), names) if 
names.contains("|") =>
    +        Alias(udtf.copy(aliasNames = names.split("\\|")), names)()
    --- End diff --
    
    I believe this will work, but seems a little hacky to me. A better way 
probably is create a new expression node like `MultiAlias`. And since only 
single UDTF expression is supported the SELECT clause, we'd better also add a 
semantic checking in `analyzer`.
    What do you think?


---
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]

Reply via email to