Vuk Ercegovac has uploaded a new patch set (#2). ( http://gerrit.cloudera.org:8080/9133 )
Change subject: IMPALA-3562: support column restriction for compute stats ...................................................................... IMPALA-3562: support column restriction for compute stats The 'compute stats' statement currently computes column-level statistics for all columns of a table. This adds potentially unneeded work for columns whose stats are not needed by queries. It can be especially costly for very wide tables and unneeded large string fields. This change modifies the 'compute stats' (non-incremental only) to support a user-specified list of columns for which stats should be computed. An example with the extension is as follows: compute stats my_db.my_table(column_a, column_b); While the phrase "for columns ..." is commonly used, since 'compute stats' seems fairly unique (vs. 'analyze table ...'), this change favors brevity with the parenthesized column list. Whereas currently 'compute stats' is applied to the columns that can be analyzed, the 'compute stats' in this change results in an error when a column is specified that cannot be analyzed (e.g., column does not exist, column is of an unsupported type, column is a partitioning column). Moreover, an empty column list can be supplied which means that no columns will be analyzed. Testing: - analyzing a subset of columns is already supported (e.g., not all columns can be analyzed), so the focus with testing is to check that the user-specified columns are handled as expected. - tests include: parser tests, ddl analysis, end-to-end tests. Change-Id: If8b25dd248e578dc7ddd35468125cca12d1b9f27 --- M fe/src/main/cup/sql-parser.cup M fe/src/main/java/org/apache/impala/analysis/ComputeStatsStmt.java M fe/src/main/java/org/apache/impala/catalog/Table.java M fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java M fe/src/test/java/org/apache/impala/analysis/ParserTest.java M testdata/workloads/functional-query/queries/QueryTest/compute-stats.test 6 files changed, 198 insertions(+), 25 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/33/9133/2 -- To view, visit http://gerrit.cloudera.org:8080/9133 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: If8b25dd248e578dc7ddd35468125cca12d1b9f27 Gerrit-Change-Number: 9133 Gerrit-PatchSet: 2 Gerrit-Owner: Vuk Ercegovac <vercego...@cloudera.com>