Quanlong Huang has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/23536 )

Change subject: IMPALA-13066: Extend SHOW CREATE TABLE to include stats and 
partitions
......................................................................


Patch Set 7:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/23536/3/fe/src/main/java/org/apache/impala/analysis/ToSqlUtils.java
File fe/src/main/java/org/apache/impala/analysis/ToSqlUtils.java:

http://gerrit.cloudera.org:8080/#/c/23536/3/fe/src/main/java/org/apache/impala/analysis/ToSqlUtils.java@571
PS3, Line 571:         kuduParamsSql, new Pair<>(innerStmt.getSortColumns(),
             :         innerStmt.getSortingOrder()), properties, 
innerStmt.getSerdeProperties(),
             :         innerStmt.isExternal(), innerStmt.ge
> This can have potential scale issue if a table has thousands of partitions,
That's a good point. But sometimes we do need the partition info. The 
motivation of this JIRA is to ease the steps of reproducing metadata of a table 
from customers. Currently we have to run SHOW CREATE TABLE + DESCRIBE FORMATTED 
+ SHOW TABLE STATS + SHOW COLUMN STATS + SHOW PARTITIONS on the table. Then in 
the next round of communication, collect info of some/sampled partitions by 
DESCRIBE FORMATTED on each of the partitions.

It'd be nice to output some partitions to save the second round of 
communication. E.g. adding a query option as the limit on number of shown 
partitions. The default can be 1000. Show a warning message if some partitions 
are skipped due to exceeding the limit.


http://gerrit.cloudera.org:8080/#/c/23536/6/fe/src/main/java/org/apache/impala/analysis/ToSqlUtils.java
File fe/src/main/java/org/apache/impala/analysis/ToSqlUtils.java:

http://gerrit.cloudera.org:8080/#/c/23536/6/fe/src/main/java/org/apache/impala/analysis/ToSqlUtils.java@134
PS6, Line 134:     props.remove(StatsSetupConst.DO_NOT_UPDATE_STATS);
             :
             :     // Hide properties that are materialized elsewhere in DDL
             :     removeHiddenTableProperties(props);
             :
             :     // Table-format specific filtering
             :     if (table instanceof FeKuduTable) {
> Done
Agree that some stats properties are useful. I see we only add NUM_ROWS so far. 
Please also add NUM_FILES and TOTAL_SIZE.



--
To view, visit http://gerrit.cloudera.org:8080/23536
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I87950ae9d9bb73cb2a435cf5bcad076df1570dc2
Gerrit-Change-Number: 23536
Gerrit-PatchSet: 7
Gerrit-Owner: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Riza Suminto <[email protected]>
Gerrit-Comment-Date: Tue, 21 Oct 2025 10:30:04 +0000
Gerrit-HasComments: Yes

Reply via email to