You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2020/03/16 22:51:06 UTC

[jira] [Updated] (SPARK-29685) Spark SQL also better to show the column details while doing SELECT * from table, like sparkshell and spark beeline

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

Dongjoon Hyun updated SPARK-29685:
----------------------------------
    Affects Version/s:     (was: 3.0.0)
                       3.1.0

> Spark SQL also better to show the column details while doing SELECT * from table, like sparkshell and spark beeline
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-29685
>                 URL: https://issues.apache.org/jira/browse/SPARK-29685
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.1.0
>            Reporter: jobit mathew
>            Priority: Minor
>
> Spark SQL also better to show the column details in top while doing SELECT * from table, like spark scala shell and spark beeline shows in table format.
> *Test steps*
> 1.create table table1(id int,name string,address string);
> 2.insert into table1 values (5,name1,add1);
> 3.insert into table1 values (5,name2,add2);
> 4.insert into table1 values (5,name3,add3);
> {code:java}
> spark-sql> select * from table1;
> 5       name3   add3
> 5       name1   add1
> 5       name2   add2
> But in spark scala shell & spark beeline shows the columns details also in table format
> scala> sql("select * from table1").show()
> +---+-----+-------+
> | id| name|address|
> +---+-----+-------+
> |  5|name3|   add3|
> |  5|name1|   add1|
> |  5|name2|   add2|
> +---+-----+-------+
> scala>
> 0: jdbc:hive2://10.18.18.214:23040/default> select * from table1;
> +-----+--------+----------+--+
> | id  |  name  | address  |
> +-----+--------+----------+--+
> | 5   | name3  | add3     |
> | 5   | name1  | add1     |
> | 5   | name2  | add2     |
> +-----+--------+----------+--+
> 3 rows selected (0.679 seconds)
> 0: jdbc:hive2://10.18.18.214:23040/default>
> {code}



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

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