spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aman Omer (Jira)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-29685) Spark SQL also better to show the column details while doing SELECT * from table, like sparkshell and spark beeline
Date Thu, 31 Oct 2019 10:24:00 GMT

    [ 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


Mime
View raw message