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

"show create table" doesn't work for v2 table

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Not A Problem
    • 3.1.0
    • None
    • SQL

    Description

      I was QAing Spark 3.1.0 RC1 and found one regression: "show create table" doesn't work for v2 table.

      But when using Spark 3.0.1, "show create table" works for v2 table.

      Steps to test:

      /bin/spark-shell --packages io.delta:delta-core_2.12:0.7.0 --conf "spark.sql.extensions=io.delta.sql.DeltaSparkSessionExtension" --conf "spark.sql.catalog.spark_catalog=org.apache.spark.sql.delta.catalog.DeltaCatalog"
      
      scala> spark.sql("create table foo(i INT) using delta")
       res0: org.apache.spark.sql.DataFrame = []
      
      scala> spark.sql("show create table foo").show(false)
      
      +-----------------------------------------------+
      |createtab_stmt                                 |
      +-----------------------------------------------+
      |CREATE TABLE `default`.`foo` (
        )
      USING delta
      |
      +-----------------------------------------------+
      

      Looks like it's caused by https://github.com/apache/spark/pull/30321

       which blocks "show create table" for v2.

      Attachments

        Activity

          People

            Unassigned Unassigned
            zsxwing Shixiong Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: