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

Make the output readable for EXPLAIN CREATE TABLE and DESC EXTENDED

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • SQL
    • None

    Description

      Currently, the outputs of EXPLAIN CREATE TABLE and DESC EXTENDED are not readable.

      For example,

      CREATE EXTERNAL TABLE extTable_with_partitions (key INT, value STRING)
      PARTITIONED BY (ds STRING, hr STRING)
      LOCATION '/private/var/folders/4b/sgmfldk15js406vk7lw5llzw0000gn/T/spark-b39a6185-8981-403b-a4aa-36fb2f4ca8a9'
      

      The output of EXPLAIN command is

      ExecutedCommand CreateTable CatalogTable(`extTable_with_partitions`,CatalogTableType(EXTERNAL),CatalogStorageFormat(Some(/private/var/folders/4b/sgmfldk15js406vk7lw5llzw0000gn/T/spark-dd234718-e85d-4c5a-8353-8f1834ac0323),Some(org.apache.hadoop.mapred.TextInputFormat),Some(org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat),None,false,Map()),List(CatalogColumn(key,int,true,None), CatalogColumn(value,string,true,None), CatalogColumn(ds,string,true,None), CatalogColumn(hr,string,true,None)),List(ds, hr),List(),List(),-1,,1463026413544,-1,Map(),None,None,None), false
      

      The output of DESC EXTENDED is like

      CatalogTable(`default`.`exttable_with_partitions`,CatalogTableType(EXTERNAL),CatalogStorageFormat(Some(file:/private/var/folders/4b/sgmfldk15js406vk7lw5llzw0000gn/T/spark-dd234718-e85d-4c5a-8353-8f1834ac0323),Some(org.apache.hadoop.mapred.TextInputFormat),Some(org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat),Some(org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe),false,Map(serialization.format -> 1)),ArrayBuffer(CatalogColumn(key,int,true,None), CatalogColumn(value,string,true,None), CatalogColumn(ds,string,true,None), CatalogColumn(hr,string,true,None)),ArrayBuffer(ds, hr),List(),Buffer(),-1,xiaoli,1463026414000,0,Map(EXTERNAL -> TRUE, transient_lastDdlTime -> 1463026414),None,None,None)
      

      Attachments

        Activity

          People

            smilegator Xiao Li
            smilegator Xiao Li
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: