Github user wzhfy commented on a diff in the pull request:
https://github.com/apache/spark/pull/16422#discussion_r127230217
--- Diff:
sql/core/src/test/resources/sql-tests/results/describe-table-column.sql.out ---
@@ -0,0 +1,133 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 15
+
+
+-- !query 0
+CREATE TEMPORARY VIEW desc_col_temp_table (key int COMMENT
'column_comment') USING PARQUET
+-- !query 0 schema
+struct<>
+-- !query 0 output
+
+
+
+-- !query 1
+DESC desc_col_temp_table key
+-- !query 1 schema
+struct<col_name:string,data_type:string,comment:string>
+-- !query 1 output
+col_name data_type comment
+key int column_comment
+
+
+-- !query 2
+DESC EXTENDED desc_col_temp_table key
+-- !query 2 schema
+struct<col_name:string,data_type:string,min:string,max:string,num_nulls:string,distinct_count:string,avg_col_len:string,max_col_len:string,comment:string>
+-- !query 2 output
+col_name data_type min max num_nulls distinct_count
avg_col_len max_col_len comment
--- End diff --
I think Hive's style would have better readability only if it supports
describe multiple columns. So I did some tests, which showed hive doesn't
support that:
```
hive> desc formatted src key, value;
FAILED: ParseException line 1:22 missing EOF at ',' near 'key'
hive> desc formatted src key value;
FAILED: ParseException line 1:23 extraneous input 'value' expecting EOF
near '<EOF>'
```
Therefore, I think @cloud-fan 's proposed style is more readable.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]