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

Struct fields can't be used as sub-expression of grouping fields

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Component/s: SQL
    • Labels:
      None
    • Target Version/s:

      Description

      Some examples:

      sqlContext.jsonRDD(sc.parallelize("""{"a": {"b": [{"c": 1}]}}""" :: Nil)).registerTempTable("data1")
      sqlContext.sql("SELECT a.b[0].c FROM data1 GROUP BY a.b[0].c").collect()
      
      sqlContext.jsonRDD(sc.parallelize("""{"a": {"b": 1}}""" :: Nil)).registerTempTable("data2")
      sqlContext.sql("SELECT a.b + 1 FROM data2 GROUP BY a.b + 1").collect()
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lian cheng Cheng Lian
                Reporter:
                marmbrus Michael Armbrust
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: