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

Alter view does not preserve column case

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.0
    • 3.2.1, 3.3.0
    • SQL
    • None

    Description

      On running an `alter view` command, the column case is not preserved.

      Repro:

       

      scala> sql("create view v as select 1 as A, 1 as B")
      res2: org.apache.spark.sql.DataFrame = []
      
      scala> sql("describe v").collect.foreach(println)
      [A,int,null]
      [B,int,null]
      
      scala> sql("alter view v as select 1 as C, 1 as D")
      res4: org.apache.spark.sql.DataFrame = []
      
      scala> sql("describe v").collect.foreach(println)
      [c,int,null]
      [d,int,null]
       
      

       

       

      Attachments

        Activity

          People

            asomani Abhishek Somani
            asomani Abhishek Somani
            Wenchen Fan Wenchen Fan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: