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

Several DataFrame Methods still fail with dot in column names

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.1.0
    • None
    • SQL
    • None

    Description

      Here is an example:

      val df = Seq((1.0, 2.0), (2.0, 3.0)).toDF("y.a", "x.b")
      df.select("y.a")
      org.apache.spark.sql.AnalysisException: cannot resolve '`y.a`' given input columns: [y.a, x.b];;
      
      df.withColumn("d", col("y.a") + col("x.b"))
      org.apache.spark.sql.AnalysisException: cannot resolve '`y.a`' given input columns: [y.a, x.b];;
      

      We can use backquote to avoid the errors, but this behavior is affecting some downstream work such as RFormula and SparkR.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              actuaryzhang Wayne Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: