[ 
https://issues.apache.org/jira/browse/SPARK-30468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhenhua Wang updated SPARK-30468:
---------------------------------
    Description: 
Currently data columns are displayed in one line for show create table command, 
when the table has many columns, and columns may have long names or comments, 
the displayed result is really hard to read. E.g.

{noformat}

spark-sql> show create table test_table;

CREATE TABLE `test_table` (`col1` INT COMMENT 'This is comment for column 1', 
`col2` STRING COMMENT 'This is comment for column 2', `col3` DOUBLE COMMENT 
'This is comment for column 3')
USING parquet

{noformat}

To improve readability, we should print each column in a separate line.

{noformat}

spark-sql> show create table test_table;

CREATE TABLE `test_table` (
  `col1` INT COMMENT 'This is comment for column 1',
  `col2` STRING COMMENT 'This is comment for column 2',
  `col3` DOUBLE COMMENT 'This is comment for column 3')
USING parquet

{noformat}


  was:
Currently data columns are displayed in one line for show create table command, 
when the table has many columns, and columns may have long names or comments, 
the displayed result is really hard to read. E.g.

 {{{noformat}}}

spark-sql> show create table test_table;

CREATE TABLE `test_table` (`col1` INT COMMENT 'This is comment for column 1', 
`col2` STRING COMMENT 'This is comment for column 2', `col3` DOUBLE COMMENT 
'This is comment for column 3')

USING parquet

{{{noformat}}}

To improve readability, we should print each column in a separate line.


> Use multiple lines to display data columns for show create table command
> ------------------------------------------------------------------------
>
>                 Key: SPARK-30468
>                 URL: https://issues.apache.org/jira/browse/SPARK-30468
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Zhenhua Wang
>            Priority: Minor
>
> Currently data columns are displayed in one line for show create table 
> command, when the table has many columns, and columns may have long names or 
> comments, the displayed result is really hard to read. E.g.
> {noformat}
> spark-sql> show create table test_table;
> CREATE TABLE `test_table` (`col1` INT COMMENT 'This is comment for column 1', 
> `col2` STRING COMMENT 'This is comment for column 2', `col3` DOUBLE COMMENT 
> 'This is comment for column 3')
> USING parquet
> {noformat}
> To improve readability, we should print each column in a separate line.
> {noformat}
> spark-sql> show create table test_table;
> CREATE TABLE `test_table` (
>   `col1` INT COMMENT 'This is comment for column 1',
>   `col2` STRING COMMENT 'This is comment for column 2',
>   `col3` DOUBLE COMMENT 'This is comment for column 3')
> USING parquet
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to