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

HiveContext does not support dots in column names.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • SQL
    • None

    Description

      When you try the following snippet in hive/console.

      val data = sc.parallelize(Seq("""{"key.number1": "value1", "key.number2": "value2"}"""))
      jsonRDD(data).registerAsTable("jt")
      hql("select `key.number1` from jt")
      

      You will find the name of key.number1 cannot be resolved.

      org.apache.spark.sql.catalyst.errors.package$TreeNodeException: Unresolved attributes: 'key.number1, tree:
      Project ['key.number1]
       LowerCaseSchema 
        Subquery jt
         SparkLogicalPlan (ExistingRdd [key.number1#8,key.number2#9], MappedRDD[17] at map at JsonRDD.scala:37)
      

      Note that when we fix this we should also fix the qualifiedName functions for attributes and table names.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yhuai Yin Huai
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: