Hyukjin Kwon created SPARK-33803:
------------------------------------
Summary: Sort table properties by key in DESCRIBE TABLE command
Key: SPARK-33803
URL: https://issues.apache.org/jira/browse/SPARK-33803
Project: Spark
Issue Type: Improvement
Components: SQL
Affects Versions: 3.1.0
Reporter: Hyukjin Kwon
Currently:
{code}
-- !query
DESC FORMATTED v
-- !query schema
struct<col_name:string,data_type:string,comment:string>
-- !query output
a string
b int
c string
d string
# Detailed Table Information
Database default
Table v
Created Time [not included in comparison]
Last Access [not included in comparison]
Created By [not included in comparison]
Type VIEW
View Text SELECT * FROM t
View Original Text SELECT * FROM t
View Catalog and Namespace spark_catalog.default
View Query Output Columns [a, b, c, d]
Table Properties [view.catalogAndNamespace.numParts=2,
view.catalogAndNamespace.part.0=spark_catalog,
view.catalogAndNamespace.part.1=default, view.query.out.col.0=a,
view.query.out.col.1=b, view.query.out.col.2=c, view.query.out.col.3=d,
view.query.out.numCols=4, view.referredTempFunctionsNames=[],
view.referredTempViewNames=[]]
{code}
The order of "Table Properties" is indeterministic which makes the test above
fails in other environments. It should be best to sort it by key. This is
consistent with DSv2 command as well.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]