You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Aman Omer (Jira)" <ji...@apache.org> on 2019/10/31 10:24:00 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=16963843#comment-16963843 ] 

Aman Omer commented on SPARK-29685:
-----------------------------------

Thanks [~jobitmathew]. I am checking this one.

> 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: Bug
>          Components: SQL
>    Affects Versions: 2.4.4, 3.0.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);
> 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>



--
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