Change the 'comment' content for column when execute command 'desc formatted table_name'

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Change the 'comment' content for column when execute command 'desc formatted table_name'

xm_zzc
This post was updated on .
Hi dev:
  Currently the 'comment' content for column is ambiguous and unclear when
execute command 'desc formatted table_name', for example:
  ran create table sql:
  CREATE TABLE IF NOT EXISTS test_table (
    id INT,
    name STRING,
    city STRING,
    salary LONG,
    tax DOUBLE
    )
    STORED BY 'carbondata'
    TBLPROPERTIES(
    'streaming'='false', 'sort_columns'='name,id',
'dictionary_include'='name');
   
  and then ran 'desc formatted test_table', it showed the content below:
  |col_name  |data_type     |comment                                     |
  +----------+--------------+--------------------------------------------+
  |id            |int                |KEY COLUMN,NOINVERTEDINDEX,null             |
  |name      |string            |DICTIONARY, KEY COLUMN,null                 |
  |city         |string            |KEY COLUMN,null                             |
  |salary     |bigint             |MEASURE,null                                |
  |tax         |double            |MEASURE,null                                |
  |          |              |                                            |
 
  1. what's the 'KEY COLUMN' mean? all document do not describe this
concept, just introduce dimension column, measure column, inverted index,
dictionary column and so on.
  2. Actually 'city' field is just a dimension column and does not have
inverted index, but 'id', 'name' and 'city' field are shown as 'KEY COLUMN',
how to distinguish between them?
 
  So IMO, We can show more detailed information on 'comment' column and
remove 'KEY COLUMN' description, for example:
  run 'desc formatted test_table', it can show the content below:
  |col_name  |data_type     |comment                                     |
  +----------+--------------+--------------------------------------------+
  |id            |int               |DIMENSION,NOINVERTEDINDEX,null              |
  |name      |string           |DIMENSION,DICTIONARY,INVERTEDINDEX,null     |
  |city         |string           |DIMENSION,null                              |
  |salary     |bigint            |MEASURE,null                                |
  |tax         |double           |MEASURE,null                                |
  |          |              |                                            |
 
  How about this change? Any suggestion for this? Please let me know.




--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

Liang Chen
Administrator
Hi

Thank you started the discussion.

Propose to completely optimize this part, my suggestion as below :

CREATE TABLE IF NOT EXISTS test_table (
    id INT COMMENT 'device id for sensor XYZ',
    name STRING,
    salary LONG,
    tax DOUBLE
    )
PARTITIONED BY (city STRING)
STORED BY 'carbondata'
TBLPROPERTIES('SORT_COLUMNS'='name,id','NO_INVERTED_INDEX'='id','DICTIONARY_INCLUDE'='name')

## Table Schema Information
|col_name  |data_type     |comment                                     |
+----------+--------------+--------------------------------------------+
|id        |int           |device id for sensor XYZ      
|name      |string        |                
|city      |string        |    
|salary    |bigint        |
|tax       |double        |    

## Table Basic Information
|Database Name                       |default                                                                        
|                                                                        |
|Table Name                          |test_table                                                                    
|                                                                        |
|CARBON Store Path                   |/Users/apple/DEMO/presto_test/data                                            
|                                                                        |
|Comment                             |                                                                              
|                                                                        |                                                                    
|                                                                        |
|Table Data Size                     |0                                                                              
|                                                                        |
|Table Index Size                    |0                                                                              
|                                                                        |
|Last Update Time                    |0    
       
## Detailed Table Properties Information
|SORT_COLUMNS             |name,id
|NO_INVERTED_INDEX        |id
|DICTIONARY_INCLUDE       |name
|TABLE_BLOCKSIZE          |1024 MB
|SORT_SCOPE               |LOCAL_SORT
|STREAMING                |false

## Detailed Partition Information
|PARTITION_COLUMNS        |city

## Location Path

## As Select_statement


Regards
Liang


xm_zzc wrote

> Hi dev:
>   Currently the 'comment' content for column is ambiguous and unclear when
> execute command 'desc formatted table_name', for example:
>   ran create table sql:
>   CREATE TABLE IF NOT EXISTS test_table (
>     id INT,
>     name STRING,
>     city STRING,
>     salary LONG,
>     tax DOUBLE
>     )
>     STORED BY 'carbondata'
>     TBLPROPERTIES(
>     'streaming'='false', 'sort_columns'='name,id',
> 'dictionary_include'='name');
>    
>   and then ran 'desc formatted test_table', it showed the content below:
>   |col_name  |data_type     |comment                                     |
>   +----------+--------------+--------------------------------------------+
>   |id            |int                |
*
> KEY COLUMN,NOINVERTEDINDEX
*
> ,null             |
>   |name      |string            |DICTIONARY,
*
> KEY COLUMN
*
> ,null                 |
>   |city         |string            |
*
> KEY COLUMN
*

> ,null                             |
>   |salary     |bigint             |MEASURE,null                              
> |
>   |tax         |double            |MEASURE,null                              
> |
>   |          |              |                                            |
>  
>   1. what's the 'KEY COLUMN' mean? all document do not describe this
> concept, just introduce dimension column, measure column, inverted index,
> dictionary column and so on.
>   2. Actually 'city' field is just a dimension column and does not have
> inverted index, but 'id', 'name' and 'city' field are shown as 'KEY
> COLUMN',
> how to distinguish between them?
>  
>   So IMO, We can show more detailed information on 'comment' column and
> remove 'KEY COLUMN' description, for example:
>   run 'desc formatted test_table', it can show the content below:
>   |col_name  |data_type     |comment                                     |
>   +----------+--------------+--------------------------------------------+
>   |id            |int               |
*
> DIMENSION,NOINVERTEDINDEX
*
> ,null              |
>   |name      |string           |
*
> DIMENSION,DICTIONARY,INVERTEDINDEX
*
> ,null     |
>   |city         |string           |
*
> DIMENSION
*

> ,null                              |
>   |salary     |bigint            |MEASURE,null                              
> |
>   |tax         |double           |MEASURE,null                              
> |
>   |          |              |                                            |
>  
>   How about this change? Any suggestion for this? Please let me know.
>
>
>
>
> --
> Sent from:
> http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/





--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

Liang Chen
Administrator
In reply to this post by xm_zzc
Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

Venkata Gollamudi
I agree with Liang, Better we align with create table terminology and
properties. Details of properties, user can easily get from Create table
DDL documentation.

Regards,
Ramana

On Thu, Apr 26, 2018 at 8:17 AM, Liang Chen <[hidden email]> wrote:

> Hi
>
> Attaching my proposed "desc_table_info":
> desc_table_info.txt
> <http://apache-carbondata-dev-mailing-list-archive.1130556.
> n5.nabble.com/file/t1/desc_table_info.txt>
>
> Regards
> Liang
>
>
>
> --
> Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.
> n5.nabble.com/
>
Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

manishgupta88
I agree with Liang. We can modify the complete describe formatted command
display and show the detailed information as suggested by Liang.
Liang we can make a small change in your suggestion. As we are displaying
the information to the user we should not include Underscore(_) in the
property names and in place of DICTIONARY_INCLUDE and DICTIONARY_EXCLUDE we
can just say Dictionary columns and No Dictionary Columns.

## Detailed Table Properties Information
|Sort Columns             |name,id
|No Inverted Index      |id
|Dictionary Columns    |name
|Table BlockSize          |1024 MB
|Sort Scope                |LOCAL_SORT
|Streaming                 |false

Regards
Manish Gupta



--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

ravipesala

I agree with Liang's suggestion to align the information with table schema. And I have one suggestion related to NO_INVERTED_INDEX , instead of mentioning no inverted index columns better mention which are inverted index columns. It is very hard user to understand which are inverted index columns and it is useful if we change our default behaviour of selecting index columns if we provide this information to table describe command.
Regards,
Ravindra.

Sent from Mailspring (https://link.getmailspring.com/link/1524723947.local-c273b69b-15c2-v1.2.1-7e7447b6@.../0?redirect=https%3A%2F%2Fgetmailspring.com%2F&recipient=ZGV2QGNhcmJvbmRhdGEuYXBhY2hlLm9yZw%3D%3D), the best free email app for work
On Apr 26 2018, at 10:34 am, manishgupta88 <[hidden email]> wrote:

>
> I agree with Liang. We can modify the complete describe formatted command
> display and show the detailed information as suggested by Liang.
> Liang we can make a small change in your suggestion. As we are displaying
> the information to the user we should not include Underscore(_) in the
> property names and in place of DICTIONARY_INCLUDE and DICTIONARY_EXCLUDE we
> can just say Dictionary columns and No Dictionary Columns.
>
> ## Detailed Table Properties Information
> |Sort Columns |name,id
> |No Inverted Index |id
> |Dictionary Columns |name
> |Table BlockSize |1024 MB
> |Sort Scope |LOCAL_SORT
> |Streaming |false
>
> Regards
> Manish Gupta
>
>
>
> --
> Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
>

Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

Liang Chen
Administrator
Hi Ravi

Good thinking.

Because the inverted index columns by default are the same as sort_column
columns,  from the user perspective, he only need to set no_inverted_index
columns in sort_column columns,  so i proposed to display only the
no_inverted_index columns info which be set by user.

Anyway, in "data management on carbondata" need to update the info: inverted
index columns by default be enabled along with sort_columns....

Regards
Liang


ravipesala wrote

> I agree with Liang's suggestion to align the information with table
> schema. And I have one suggestion related to NO_INVERTED_INDEX , instead
> of mentioning no inverted index columns better mention which are inverted
> index columns. It is very hard user to understand which are inverted index
> columns and it is useful if we change our default behaviour of selecting
> index columns if we provide this information to table describe command.
> Regards,
> Ravindra.
>
> Sent from Mailspring (https://link.getmailspring.com/link/

> 1524723947.local-c273b69b-15c2-v1.2.1-7e7447b6@

> /0?redirect=https%3A%2F%2Fgetmailspring.com%2F&recipient=ZGV2QGNhcmJvbmRhdGEuYXBhY2hlLm9yZw%3D%3D),
> the best free email app for work
> On Apr 26 2018, at 10:34 am, manishgupta88 &lt;

> tomanishgupta18@

> &gt; wrote:
>>
>> I agree with Liang. We can modify the complete describe formatted command
>> display and show the detailed information as suggested by Liang.
>> Liang we can make a small change in your suggestion. As we are displaying
>> the information to the user we should not include Underscore(_) in the
>> property names and in place of DICTIONARY_INCLUDE and DICTIONARY_EXCLUDE
>> we
>> can just say Dictionary columns and No Dictionary Columns.
>>
>> ## Detailed Table Properties Information
>> |Sort Columns |name,id
>> |No Inverted Index |id
>> |Dictionary Columns |name
>> |Table BlockSize |1024 MB
>> |Sort Scope |LOCAL_SORT
>> |Streaming |false
>>
>> Regards
>> Manish Gupta
>>
>>
>>
>> --
>> Sent from:
>> http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
>>





--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

Jacky Li
In reply to this post by manishgupta88


> 在 2018年4月26日,下午1:04,manishgupta88 <[hidden email]> 写道:
>
> I agree with Liang. We can modify the complete describe formatted command
> display and show the detailed information as suggested by Liang.
> Liang we can make a small change in your suggestion. As we are displaying
> the information to the user we should not include Underscore(_) in the
> property names and in place of DICTIONARY_INCLUDE and DICTIONARY_EXCLUDE we
> can just say Dictionary columns and No Dictionary Columns.
>

Likun:  I think it is better to print the table property name and value as it is defined by the user, and only the table properties should be print in a proper order, for example:
Sort related: SORT_COLUMNS, SORT_SCOPE
Encoding related: DICTIONARY_INCLUDE, NO_INVERTED_INDEX
Other properties: TABLE_BLOCKSIZE, STREAMING, etc

> ## Detailed Table Properties Information
> |Sort Columns             |name,id
> |No Inverted Index      |id
> |Dictionary Columns    |name
> |Table BlockSize          |1024 MB
> |Sort Scope                |LOCAL_SORT
> |Streaming                 |false
>
> Regards
> Manish Gupta
>
>
> --
> Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/



Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

xuchuanyin
How is this going?
Who can make a final conclusion?



--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

xm_zzc
hi, xuchuanyin:
  I can raise a pr for this change in a few days.



--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

xuchuanyin
Then what's the final output looks like?



--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

xm_zzc
Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

xm_zzc
In reply to this post by Jacky Li
Hi dev:
  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 IF NOT EXISTS test_table
STORED BY 'carbondata'
TBLPROPERTIES(
'streaming'='false', 'sort_columns'='id,city', 'dictionary_include'='name')
AS SELECT * from source_test ;*

The non-formatted sql I get is :
*SELECT*fromsource_test*

desc_formatted.txt
<http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/file/t133/desc_formatted.txt>  
desc_formatted_external.txt
<http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/file/t133/desc_formatted_external.txt>  






--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

Jacky Li
Hi ZZC,

Can you create a JIRA ticket and upload the design doc, in mail list we can not get the attachment

Regards,
Jacky

> 在 2018年8月20日,上午11:20,xm_zzc <[hidden email]> 写道:
>
> Hi dev:
>  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 IF NOT EXISTS test_table
> STORED BY 'carbondata'
> TBLPROPERTIES(
> 'streaming'='false', 'sort_columns'='id,city', 'dictionary_include'='name')
> AS SELECT * from source_test ;*
>
> The non-formatted sql I get is :
> *SELECT*fromsource_test*
>
> desc_formatted.txt
> <http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/file/t133/desc_formatted.txt>  
> desc_formatted_external.txt
> <http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/file/t133/desc_formatted_external.txt>  
>
>
>
>
>
>
> --
> Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
>



Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

xm_zzc
Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

Jacky Li
In reply to this post by xm_zzc
Hi ZZC,

I have checked the doc in CARBONDATA-2595. I have following comments:
1. In the Table Basic Information section, it is better to print the Table Path instead of "CARBON Store Path”
2. For the Table Data Size  and Index Size, can you format the output in GB, MB, KB, etc
3. For the Last Update Time, can you format the output in UTC time like YYYY-MM-DD hh:mm:ss
4. In table property, I think maybe some properties are missing, like block size, blocklet size, long string

For implementation, I suggest to write the main logic of collecting these information in java so that it is easier to write tools for it. One tool can be this SQL command and another tool I can think of is an standalone java executable that  can print these information on the screen by reading the given table path. (We can put this standalone tool in SDK module)

Regards,
Jacky


> 在 2018年8月20日,上午11:20,xm_zzc <[hidden email]> 写道:
>
> Hi dev:
>  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 IF NOT EXISTS test_table
> STORED BY 'carbondata'
> TBLPROPERTIES(
> 'streaming'='false', 'sort_columns'='id,city', 'dictionary_include'='name')
> AS SELECT * from source_test ;*
>
> The non-formatted sql I get is :
> *SELECT*fromsource_test*
>
> desc_formatted.txt
> <http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/file/t133/desc_formatted.txt>  
> desc_formatted_external.txt
> <http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/file/t133/desc_formatted_external.txt>  
>
>
>
>
>
>
> --
> Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
>



Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

Liang Chen
Administrator
Hi

1. Agree with likun's comments(4 points) :

2. About 'select sql' for CTAS , you can leave it. we can consider it later.

Regards
Liang

Jacky Li wrote

> Hi ZZC,
>
> I have checked the doc in CARBONDATA-2595. I have following comments:
> 1. In the Table Basic Information section, it is better to print the Table
> Path instead of "CARBON Store Path”
> 2. For the Table Data Size  and Index Size, can you format the output in
> GB, MB, KB, etc
> 3. For the Last Update Time, can you format the output in UTC time like
> YYYY-MM-DD hh:mm:ss
> 4. In table property, I think maybe some properties are missing, like
> block size, blocklet size, long string
>
> For implementation, I suggest to write the main logic of collecting these
> information in java so that it is easier to write tools for it. One tool
> can be this SQL command and another tool I can think of is an standalone
> java executable that  can print these information on the screen by reading
> the given table path. (We can put this standalone tool in SDK module)
>
> Regards,
> Jacky
>
>
>> 在 2018年8月20日,上午11:20,xm_zzc <

> 441586683@

>> 写道:
>>
>> Hi dev:
>>  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 IF NOT EXISTS test_table
>> STORED BY 'carbondata'
>> TBLPROPERTIES(
>> 'streaming'='false', 'sort_columns'='id,city',
>> 'dictionary_include'='name')
>> AS SELECT * from source_test ;*
>>
>> The non-formatted sql I get is :
>> *SELECT*fromsource_test*
>>
>> desc_formatted.txt
>> &lt;http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/file/t133/desc_formatted.txt&gt; 
>> desc_formatted_external.txt
>> &lt;http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/file/t133/desc_formatted_external.txt&gt; 
>>
>>
>>
>>
>>
>>
>> --
>> Sent from:
>> http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
>>





--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

sraghunandan
Hi,
In opinion it is not required to show the original select sql. Also is
there a way to get it? I don't think it can be got.


Regards
Raghu

On Tue, 21 Aug 2018, 8:02 pm Liang Chen, <[hidden email]> wrote:

> Hi
>
> 1. Agree with likun's comments(4 points) :
>
> 2. About 'select sql' for CTAS , you can leave it. we can consider it
> later.
>
> Regards
> Liang
>
> Jacky Li wrote
> > Hi ZZC,
> >
> > I have checked the doc in CARBONDATA-2595. I have following comments:
> > 1. In the Table Basic Information section, it is better to print the
> Table
> > Path instead of "CARBON Store Path”
> > 2. For the Table Data Size  and Index Size, can you format the output in
> > GB, MB, KB, etc
> > 3. For the Last Update Time, can you format the output in UTC time like
> > YYYY-MM-DD hh:mm:ss
> > 4. In table property, I think maybe some properties are missing, like
> > block size, blocklet size, long string
> >
> > For implementation, I suggest to write the main logic of collecting these
> > information in java so that it is easier to write tools for it. One tool
> > can be this SQL command and another tool I can think of is an standalone
> > java executable that  can print these information on the screen by
> reading
> > the given table path. (We can put this standalone tool in SDK module)
> >
> > Regards,
> > Jacky
> >
> >
> >> 在 2018年8月20日,上午11:20,xm_zzc <
>
> > 441586683@
>
> >> 写道:
> >>
> >> Hi dev:
> >>  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 IF NOT EXISTS test_table
> >> STORED BY 'carbondata'
> >> TBLPROPERTIES(
> >> 'streaming'='false', 'sort_columns'='id,city',
> >> 'dictionary_include'='name')
> >> AS SELECT * from source_test ;*
> >>
> >> The non-formatted sql I get is :
> >> *SELECT*fromsource_test*
> >>
> >> desc_formatted.txt
> >> &lt;
> http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/file/t133/desc_formatted.txt&gt;
>
> >> desc_formatted_external.txt
> >> &lt;
> http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/file/t133/desc_formatted_external.txt&gt;
>
> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >> Sent from:
> >>
> http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
> >>
>
>
>
>
>
> --
> Sent from:
> http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
>
Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

ravipesala
Yes, I agree with Liang. We no need to consider showing sql in describe
table in case of CTAS.

Regards
Ravindra

On Tue, 21 Aug 2018 at 20:47, Raghunandan S <
[hidden email]> wrote:

> Hi,
> In opinion it is not required to show the original select sql. Also is
> there a way to get it? I don't think it can be got.
>
>
> Regards
> Raghu
>
> On Tue, 21 Aug 2018, 8:02 pm Liang Chen, <[hidden email]> wrote:
>
> > Hi
> >
> > 1. Agree with likun's comments(4 points) :
> >
> > 2. About 'select sql' for CTAS , you can leave it. we can consider it
> > later.
> >
> > Regards
> > Liang
> >
> > Jacky Li wrote
> > > Hi ZZC,
> > >
> > > I have checked the doc in CARBONDATA-2595. I have following comments:
> > > 1. In the Table Basic Information section, it is better to print the
> > Table
> > > Path instead of "CARBON Store Path”
> > > 2. For the Table Data Size  and Index Size, can you format the output
> in
> > > GB, MB, KB, etc
> > > 3. For the Last Update Time, can you format the output in UTC time like
> > > YYYY-MM-DD hh:mm:ss
> > > 4. In table property, I think maybe some properties are missing, like
> > > block size, blocklet size, long string
> > >
> > > For implementation, I suggest to write the main logic of collecting
> these
> > > information in java so that it is easier to write tools for it. One
> tool
> > > can be this SQL command and another tool I can think of is an
> standalone
> > > java executable that  can print these information on the screen by
> > reading
> > > the given table path. (We can put this standalone tool in SDK module)
> > >
> > > Regards,
> > > Jacky
> > >
> > >
> > >> 在 2018年8月20日,上午11:20,xm_zzc <
> >
> > > 441586683@
> >
> > >> 写道:
> > >>
> > >> Hi dev:
> > >>  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 IF NOT EXISTS test_table
> > >> STORED BY 'carbondata'
> > >> TBLPROPERTIES(
> > >> 'streaming'='false', 'sort_columns'='id,city',
> > >> 'dictionary_include'='name')
> > >> AS SELECT * from source_test ;*
> > >>
> > >> The non-formatted sql I get is :
> > >> *SELECT*fromsource_test*
> > >>
> > >> desc_formatted.txt
> > >> &lt;
> >
> http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/file/t133/desc_formatted.txt&gt
> ;
> >
> > >> desc_formatted_external.txt
> > >> &lt;
> >
> http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/file/t133/desc_formatted_external.txt&gt
> ;
> >
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> --
> > >> Sent from:
> > >>
> > http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
> > >>
> >
> >
> >
> >
> >
> > --
> > Sent from:
> > http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
> >
>


--
Thanks & Regards,
Ravi
Reply | Threaded
Open this post in threaded view
|

Re: Change the 'comment' content for column when execute command 'desc formatted table_name'

xm_zzc
Hi all:
  Got it, thanks for your suggestions, I will implement this and raise a pr.



--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
12