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 < carbondatacontributi...@gmail.com> 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, <chenliang6...@gmail.com> 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 > > >> < > > > 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/ > > >> > > > > > > > > > > > > -- > > Sent from: > > http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/ > > > -- Thanks & Regards, Ravi