Login  Register

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

Posted by Jacky Li on Aug 21, 2018; 1:56pm
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/Change-the-comment-content-for-column-when-execute-command-desc-formatted-table-name-tp46848p59897.html

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