Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 61 additions & 55 deletions sql/core/src/test/resources/sql-tests/results/describe.sql.out
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ DESCRIBE t
-- !query 2 schema
struct<col_name:string,data_type:string,comment:string>
-- !query 2 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


Expand All @@ -38,13 +38,13 @@ DESC t
-- !query 3 schema
struct<col_name:string,data_type:string,comment:string>
-- !query 3 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


Expand All @@ -53,13 +53,13 @@ DESC TABLE 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


Expand All @@ -68,34 +68,45 @@ DESC FORMATTED t
-- !query 5 schema
struct<col_name:string,data_type:string,comment:string>
-- !query 5 output
# Detailed Table Information
a string
b int
c string
d string
# Partition Information
# Storage Information
# col_name data_type comment
Comment: table_comment
Compressed: No
Created:
c string
d string

# Detailed Table Information
Database: default
Owner:
Created:
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
d string
Comment: table_comment
Table Parameters:

# Storage Information
Compressed: No
Storage Desc Parameters:
Partition Provider: Catalog


-- !query 6
DESC EXTENDED t
-- !query 6 schema
struct<col_name:string,data_type:string,comment:string>
-- !query 6 output
a string
b int
c string
d string
# Partition Information
# col_name data_type comment
c string
d string

# Detailed Table Information CatalogTable(
Table: `default`.`t`
Created:
Expand All @@ -106,29 +117,21 @@ struct<col_name:string,data_type:string,comment:string>
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
d string
Partition Provider: Catalog)


-- !query 7
DESC t PARTITION (c='Us', d=1)
-- !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
c string
d string
# Partition Information
# col_name data_type comment
c string
d string


Expand All @@ -137,42 +140,45 @@ DESC EXTENDED t PARTITION (c='Us', d=1)
-- !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 Partition Information CatalogPartition(
Partition Values: [c=Us, d=1]
Storage(Location: sql/core/spark-warehouse/t/c=Us/d=1)
Partition Parameters:{})


-- !query 9
DESC FORMATTED t PARTITION (c='Us', d=1)
-- !query 9 schema
struct<col_name:string,data_type:string,comment:string>
-- !query 9 output
# Detailed Partition Information
# 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
a string
b int
c string
d string
# Partition Information
# col_name data_type comment
c string
d string
d string

# Detailed Partition Information
Partition Value: [Us, 1]
Database: default
Table: t
Location: sql/core/spark-warehouse/t/c=Us/d=1
Partition Parameters:

# Storage Information
Compressed: No
Storage Desc Parameters:


-- !query 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ describe function to_json
-- !query 0 schema
struct<function_desc:string>
-- !query 0 output
Class: org.apache.spark.sql.catalyst.expressions.StructsToJson
Function: to_json
Class: org.apache.spark.sql.catalyst.expressions.StructsToJson
Usage: to_json(expr[, options]) - Returns a json string with a given struct value


Expand All @@ -17,7 +17,9 @@ describe function extended to_json
-- !query 1 schema
struct<function_desc:string>
-- !query 1 output
Function: to_json
Class: org.apache.spark.sql.catalyst.expressions.StructsToJson
Usage: to_json(expr[, options]) - Returns a json string with a given struct value
Extended Usage:
Examples:
> SELECT to_json(named_struct('a', 1, 'b', 2));
Expand All @@ -26,9 +28,6 @@ Extended Usage:
{"time":"26/08/2015"}
> SELECT to_json(array(named_struct('a', 1, 'b', 2));
[{"a":1,"b":2}]

Function: to_json
Usage: to_json(expr[, options]) - Returns a json string with a given struct value


-- !query 2
Expand Down Expand Up @@ -87,8 +86,8 @@ describe function from_json
-- !query 8 schema
struct<function_desc:string>
-- !query 8 output
Class: org.apache.spark.sql.catalyst.expressions.JsonToStructs
Function: from_json
Class: org.apache.spark.sql.catalyst.expressions.JsonToStructs
Usage: from_json(jsonStr, schema[, options]) - Returns a struct value with the given `jsonStr` and `schema`.


Expand All @@ -97,16 +96,15 @@ describe function extended from_json
-- !query 9 schema
struct<function_desc:string>
-- !query 9 output
Function: from_json
Class: org.apache.spark.sql.catalyst.expressions.JsonToStructs
Usage: from_json(jsonStr, schema[, options]) - Returns a struct value with the given `jsonStr` and `schema`.
Extended Usage:
Examples:
> SELECT from_json('{"a":1, "b":0.8}', 'a INT, b DOUBLE');
{"a":1, "b":0.8}
> SELECT from_json('{"time":"26/08/2015"}', 'time Timestamp', map('timestampFormat', 'dd/MM/yyyy'));
{"time":"2015-08-26 00:00:00.0"}

Function: from_json
Usage: from_json(jsonStr, schema[, options]) - Returns a struct value with the given `jsonStr` and `schema`.


-- !query 10
Expand Down
24 changes: 12 additions & 12 deletions sql/core/src/test/resources/sql-tests/results/show-tables.sql.out
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ SHOW TABLES
-- !query 7 schema
struct<database:string,tableName:string,isTemporary:boolean>
-- !query 7 output
arraydata
mapdata
show_t1
show_t2
arraydata
mapdata
show_t3
testdata

Expand All @@ -76,10 +76,10 @@ SHOW TABLES IN showdb
-- !query 8 schema
struct<database:string,tableName:string,isTemporary:boolean>
-- !query 8 output
arraydata
mapdata
show_t1
show_t2
arraydata
mapdata
show_t3
testdata

Expand Down Expand Up @@ -118,14 +118,6 @@ SHOW TABLE EXTENDED LIKE 'show_t*'
-- !query 12 schema
struct<database:string,tableName:string,isTemporary:boolean,information:string>
-- !query 12 output
show_t3 true CatalogTable(
Table: `show_t3`
Created:
Last Access:
Type: VIEW
Schema: [StructField(e,IntegerType,true)]
Storage())

showdb show_t1 false CatalogTable(
Table: `showdb`.`show_t1`
Created:
Expand All @@ -146,6 +138,14 @@ showdb show_t2 false CatalogTable(
Provider: parquet
Storage(Location: sql/core/spark-warehouse/showdb.db/show_t2))

show_t3 true CatalogTable(
Table: `show_t3`
Created:
Last Access:
Type: VIEW
Schema: [StructField(e,IntegerType,true)]
Storage())


-- !query 13
SHOW TABLE EXTENDED
Expand Down
Loading