You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by "Zhichao Zhang (JIRA)" <ji...@apache.org> on 2018/08/20 12:28:00 UTC

[jira] [Comment Edited] (CARBONDATA-2595) Reformat the output of command 'desc formatted table_name'

    [ https://issues.apache.org/jira/browse/CARBONDATA-2595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16585858#comment-16585858 ] 

Zhichao  Zhang edited comment on CARBONDATA-2595 at 8/20/18 12:27 PM:
----------------------------------------------------------------------

  Now I am working on this, the new format is shown in attachment, please 
 give me some feedback. 
   There is one question: if user uses CTAS to create table, do we need to 
 show the 'select sql' in the result of 'desc formatted table'? If yes, how 
 to get 'select sql'? now I just can get a non-formatted sql from 
 'CarbonSparkSqlParser.scala' (Jacky mentioned), for example: 

create table sql:
{code:java}
CREATE TABLE IF NOT EXISTS test_table 
STORED BY 'carbondata' 
TBLPROPERTIES( 
'streaming'='false', 'sort_columns'='id,city', 'dictionary_include'='name') 
AS SELECT * from source_test ;{code}
The non-formatted sql I get is : 

 
{code:java}
SELECT*fromsource_test{code}
  

any suggestion for this? 

 


was (Author: zzcclp):
  Now I am working on this, the new format is shown in attachment, please 
give me some feedback. 
  There is one question: if user uses CTAS to create table, do we need to 
show the 'select sql' in the result of 'desc formatted table'? If yes, how 
to get 'select sql'? now I just can get a non-formatted sql from 
'CarbonSparkSqlParser.scala' (Jacky mentioned), for example: 

create table sql:
{code:java}
CREATE TABLE IF NOT EXISTS test_table 
STORED BY 'carbondata' 
TBLPROPERTIES( 
'streaming'='false', 'sort_columns'='id,city', 'dictionary_include'='name') 
AS SELECT * from source_test ;{code}


The non-formatted sql I get is : 

 
{code:java}
SELECT*fromsource_test{code}
 

 

 

any suggestion for this?

 
{code:java}
 {code}
 

> Reformat the output of command 'desc formatted table_name'
> ----------------------------------------------------------
>
>                 Key: CARBONDATA-2595
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-2595
>             Project: CarbonData
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Zhichao  Zhang
>            Assignee: Zhichao  Zhang
>            Priority: Minor
>             Fix For: 1.5.0
>
>         Attachments: desc_formatted.txt, desc_formatted_external.txt
>
>
> According to the discussion in [topic|http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/Change-the-comment-content-for-column-when-execute-command-desc-formatted-table-name-td46848.html], reformat the output of command 'desc formatted table_name'. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)