Github user eyalfa commented on the issue:

    https://github.com/apache/spark/pull/14444
  
    Thanks,will do once I gain access to a computer.
    I'm not sure how well this is going to work since at the time
    CreateStruct.apply is invoked,it's quite possible that its children are not
    resolved yet,in most cases it's still possible to obtain the tree's
    name,Star is a very special case in that aspect.
    I'm afraid well see many struts loosing their attributes names.
    
    But I'll give it a shot anyway.😁
    
    On Sep 15, 2016 9:20 PM, "Herman van Hovell" <[email protected]>
    wrote:
    
    > *@hvanhovell* commented on this pull request.
    > ------------------------------
    >
    > In sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/
    > complexTypeCreator.scala
    > <https://github.com/apache/spark/pull/14444#pullrequestreview-224245>:
    >
    > > -
    > -  override lazy val dataType: StructType = {
    > -    val fields = children.zipWithIndex.map { case (child, idx) =>
    > -      child match {
    > -        case ne: NamedExpression =>
    > -          StructField(ne.name, ne.dataType, ne.nullable, ne.metadata)
    > -        case _ =>
    > -          StructField(s"col${idx + 1}", child.dataType, child.nullable, 
Metadata.empty)
    > +object CreateStruct extends (Seq[Expression] => CreateNamedStruct) {
    > +  def apply(children: Seq[Expression]) : CreateNamedStruct = {
    > +    val namedStructArgs = {
    > +      val attNames = for {
    > +        (child, idx) <- children.zipWithIndex
    > +      } yield {
    > +        child match {
    > +          case ne: NamedExpression => ne.name
    >
    > Please add if ne.resolved here and your PR should pass tests.
    >
    > —
    > You are receiving this because you were mentioned.
    > Reply to this email directly, view it on GitHub
    > <https://github.com/apache/spark/pull/14444#pullrequestreview-224245>, or 
mute
    > the thread
    > 
<https://github.com/notifications/unsubscribe-auth/ABFFOc6wLGmiY-CkwHvMcmNtUG5JpuWYks5qqYxtgaJpZM4JaDJr>
    > .
    >



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