Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-8358

DataFrame explode with alias and * fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.4.0
    • 1.4.1, 1.5.0
    • SQL
    • None

    Description

      scala> Seq((Array("a"), 1)).toDF("a", "b").select(explode($"a").as("a"), $"*")
      org.apache.spark.sql.catalyst.analysis.UnresolvedException: Invalid call to dataType on unresolved object, tree: 'a
              at org.apache.spark.sql.catalyst.analysis.UnresolvedAttribute.dataType(unresolved.scala:60)
              at org.apache.spark.sql.catalyst.expressions.Explode.elementTypes(generators.scala:107)
              at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveGenerate$AliasedGenerator$.unapply(Analyzer.scala:577)
              at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveGenerate$$anonfun$apply$16$$anonfun$22.apply(Analyzer.scala:535)
              at org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveGenerate$$anonfun$apply$16$$anonfun$22.apply(Analyzer.scala:534)
              at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
              at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
      ...
      

      Attachments

        Activity

          People

            marmbrus Michael Armbrust
            marmbrus Michael Armbrust
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: