Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17394#discussion_r109289107
  
    --- Diff: sql/core/src/test/resources/sql-tests/results/describe.sql.out ---
    @@ -1,205 +1,248 @@
     -- Automatically generated by SQLQueryTestSuite
    --- Number of queries: 14
    +-- Number of queries: 28
     
     
     -- !query 0
    -CREATE TABLE t (a STRING, b INT, c STRING, d STRING) USING parquet 
PARTITIONED BY (c, d) COMMENT 'table_comment'
    +CREATE TABLE t (a STRING, b INT, c STRING, d STRING) USING parquet
    +  PARTITIONED BY (c, d) CLUSTERED BY (a) SORTED BY (b ASC) INTO 2 BUCKETS
    +  COMMENT 'table_comment'
     -- !query 0 schema
     struct<>
     -- !query 0 output
     
     
     
     -- !query 1
    -ALTER TABLE t ADD PARTITION (c='Us', d=1)
    +CREATE TEMPORARY VIEW temp_v AS SELECT * FROM t
     -- !query 1 schema
     struct<>
     -- !query 1 output
     
     
     
     -- !query 2
    -DESCRIBE t
    +CREATE VIEW v AS SELECT * FROM t
     -- !query 2 schema
    -struct<col_name:string,data_type:string,comment:string>
    +struct<>
     -- !query 2 output
    -# Partition Information                                                
    -# col_name                 data_type               comment             
    -a                          string                                      
    -b                          int                                         
    -c                          string                                      
    -c                          string                                      
    -d                          string                                      
    -d                          string
    +
     
     
     -- !query 3
    -DESC t
    +ALTER TABLE t ADD PARTITION (c='Us', d=1)
     -- !query 3 schema
    -struct<col_name:string,data_type:string,comment:string>
    +struct<>
     -- !query 3 output
    -# Partition Information                                                
    -# col_name                 data_type               comment             
    -a                          string                                      
    -b                          int                                         
    -c                          string                                      
    -c                          string                                      
    -d                          string                                      
    -d                          string
    +
     
     
     -- !query 4
    -DESC TABLE t
    +DESCRIBE t
     -- !query 4 schema
     struct<col_name:string,data_type:string,comment:string>
     -- !query 4 output
    -# Partition Information                                                
    -# col_name                 data_type               comment             
     a                          string                                      
     b                          int                                         
     c                          string                                      
    -c                          string                                      
     d                          string                                      
    +# Partition Information                                                
    +# col_name                 data_type               comment             
    +c                          string                                      
     d                          string
     
     
     -- !query 5
    -DESC FORMATTED t
    +DESC t
     -- !query 5 schema
     struct<col_name:string,data_type:string,comment:string>
     -- !query 5 output
    -# Detailed Table Information                                               
    
    -# Partition Information                                                
    -# Storage Information                                                  
    -# col_name                 data_type               comment             
    -Comment:                   table_comment                               
    -Compressed:                No                                          
    -Created: 
    -Database:                  default                                     
    -Last Access: 
    -Location: sql/core/spark-warehouse/t                           
    -Owner:                                                                 
    -Partition Provider:        Catalog                                     
    -Storage Desc Parameters:                                               
    -Table Parameters:                                                      
    -Table Type:                MANAGED                                     
     a                          string                                      
     b                          int                                         
     c                          string                                      
    -c                          string                                      
     d                          string                                      
    +# Partition Information                                                
    +# col_name                 data_type               comment             
    +c                          string                                      
     d                          string
     
     
     -- !query 6
    -DESC EXTENDED t
    +DESC TABLE t
     -- !query 6 schema
     struct<col_name:string,data_type:string,comment:string>
     -- !query 6 output
    -# Detailed Table Information       CatalogTable(
    -   Table: `default`.`t`
    -   Created: 
    -   Last Access: 
    -   Type: MANAGED
    -   Schema: [StructField(a,StringType,true), 
StructField(b,IntegerType,true), StructField(c,StringType,true), 
StructField(d,StringType,true)]
    -   Provider: parquet
    -   Partition Columns: [`c`, `d`]
    -   Comment: table_comment
    -   Storage(Location: sql/core/spark-warehouse/t)
    -   Partition Provider: Catalog)                        
    -# Partition Information                                                
    -# col_name                 data_type               comment             
     a                          string                                      
     b                          int                                         
     c                          string                                      
    -c                          string                                      
     d                          string                                      
    +# Partition Information                                                
    +# col_name                 data_type               comment             
    +c                          string                                      
     d                          string
     
     
     -- !query 7
    -DESC t PARTITION (c='Us', d=1)
    +DESC FORMATTED t
     -- !query 7 schema
     struct<col_name:string,data_type:string,comment:string>
     -- !query 7 output
    -# Partition Information                                                
    -# col_name                 data_type               comment             
     a                          string                                      
     b                          int                                         
     c                          string                                      
    +d                          string                                      
    +# Partition Information                                                
    +# col_name                 data_type               comment             
     c                          string                                      
     d                          string                                      
    -d                          string
    +                                                                       
    +# Detailed Table Information                                               
    
    +Table                      `default`.`t`                               
    +Created[removed by SQLQueryTestSuite]
    +Last Access[removed by SQLQueryTestSuite]
    +Type                       MANAGED                                     
    +Provider                   parquet                                     
    +Num Buckets                2                                           
    +Bucket Columns             [`a`]                                       
    +Sort Columns               [`b`]                                       
    +Comment                    table_comment                               
    +Location[removed by SQLQueryTestSuite]sql/core/spark-warehouse/t           
            
    +Partition Provider         Catalog                                     
    +Partition Columns          [`c`, `d`]                                  
    +Schema                     root
    + |-- a: string (nullable = true)
    + |-- b: integer (nullable = true)
    + |-- c: string (nullable = true)
    + |-- d: string (nullable = true)
     
     
     -- !query 8
    -DESC EXTENDED t PARTITION (c='Us', d=1)
    +DESC EXTENDED t
     -- !query 8 schema
     struct<col_name:string,data_type:string,comment:string>
     -- !query 8 output
    -# Partition Information                                                
    -# col_name                 data_type               comment             
    -Detailed Partition Information CatalogPartition(
    -   Partition Values: [c=Us, d=1]
    -   Storage(Location: sql/core/spark-warehouse/t/c=Us/d=1)
    -   Partition Parameters:{})                                                
    
     a                          string                                      
     b                          int                                         
     c                          string                                      
    +d                          string                                      
    +# Partition Information                                                
    +# col_name                 data_type               comment             
     c                          string                                      
     d                          string                                      
    -d                          string
    +                                                                       
    +# Detailed Table Information                                               
    
    +Table                      `default`.`t`                               
    +Created[removed by SQLQueryTestSuite]
    +Last Access[removed by SQLQueryTestSuite]
    +Type                       MANAGED                                     
    +Provider                   parquet                                     
    +Num Buckets                2                                           
    +Bucket Columns             [`a`]                                       
    +Sort Columns               [`b`]                                       
    +Comment                    table_comment                               
    +Location[removed by SQLQueryTestSuite]sql/core/spark-warehouse/t           
            
    +Partition Provider         Catalog                                     
    +Partition Columns          [`c`, `d`]                                  
    +Schema                     root
    + |-- a: string (nullable = true)
    + |-- b: integer (nullable = true)
    + |-- c: string (nullable = true)
    + |-- d: string (nullable = true)
     
     
     -- !query 9
    -DESC FORMATTED t PARTITION (c='Us', d=1)
    +DESC t PARTITION (c='Us', d=1)
     -- !query 9 schema
     struct<col_name:string,data_type:string,comment:string>
     -- !query 9 output
    -# Detailed Partition Information                                           
    
    +a                          string                                      
    +b                          int                                         
    +c                          string                                      
    +d                          string                                      
     # Partition Information                                                
    -# Storage Information                                                  
     # col_name                 data_type               comment             
    -Compressed:                No                                          
    -Database:                  default                                     
    -Location: sql/core/spark-warehouse/t/c=Us/d=1                          
    -Partition Parameters:                                                  
    -Partition Value:           [Us, 1]                                     
    -Storage Desc Parameters:                                               
    -Table:                     t                                           
    +c                          string                                      
    +d                          string
    +
    +
    +-- !query 10
    +DESC EXTENDED t PARTITION (c='Us', d=1)
    +-- !query 10 schema
    +struct<col_name:string,data_type:string,comment:string>
    +-- !query 10 output
     a                          string                                      
     b                          int                                         
     c                          string                                      
    +d                          string                                      
    +# Partition Information                                                
    +# col_name                 data_type               comment             
     c                          string                                      
     d                          string                                      
    -d                          string
    +                                                                       
    +# Detailed Partition Information                                           
    
    +Database                   default                                     
    +Table                      t                                           
    --- End diff --
    
    Yes. 
    ```
    hive> DESC EXTENDED page_view PARTITION(dt='part1', country='part2');
    OK
    viewtime                    int                                         
    userid                      bigint                                      
    page_url                    string                                      
    referrer_url                string                                      
    ip                          string                  IP Address of the User
    dt                          string                                      
    country                     string                                      
                 
    # Partition Information              
    # col_name                  data_type               comment             
                 
    dt                          string                                      
    country                     string                                      
                 
    Detailed Partition Information      Partition(values:[part1, part2], 
dbName:default, tableName:page_view, createTime:1491066325, lastAccessTime:0, 
sd:StorageDescriptor(cols:[FieldSchema(name:viewtime, type:int, comment:null), 
FieldSchema(name:userid, type:bigint, comment:null), FieldSchema(name:page_url, 
type:string, comment:null), FieldSchema(name:referrer_url, type:string, 
comment:null), FieldSchema(name:ip, type:string, comment:IP Address of the 
User), FieldSchema(name:dt, type:string, comment:null), 
FieldSchema(name:country, type:string, comment:null)], 
location:file:/user/hive/warehouse/page_view/dt=part1/country=part2, 
inputFormat:org.apache.hadoop.mapred.SequenceFileInputFormat, 
outputFormat:org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat, 
compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, 
serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, 
parameters:{serialization.format=1}), bucketCols:[], sortCols:[], 
parameters:{}, skewedInfo:SkewedI
 nfo(skewedColNames:[], skewedColValues:[], skewedColValueLocationMaps:{}), 
storedAsSubDirectories:false), parameters:{totalSize=0, numRows=0, 
rawDataSize=0, COLUMN_STATS_ACCURATE={"BASIC_STATS":"true"}, numFiles=0, 
transient_lastDdlTime=1491066325})      
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to