impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Behm (Code Review)" <ger...@cloudera.org>
Subject [Impala-CR](cdh5-2.6.0_5.8.0) IMPALA-3369: Add ALTER TABLE SET COLUMN STATS statement.
Date Thu, 26 May 2016 02:12:21 GMT
Hello Marcel Kornacker, Dimitris Tsirogiannis,

I'd like you to reexamine a change.  Please visit

    http://gerrit.cloudera.org:8080/3189

to look at the new patch set (#9).

Change subject: IMPALA-3369: Add ALTER TABLE SET COLUMN STATS statement.
......................................................................

IMPALA-3369: Add ALTER TABLE SET COLUMN STATS statement.

Adds a new command to manually set the table-level column stats.

Syntax:
ALTER TABLE [<db_name>.]<tbl_name> SET COLUMN STATS <col_name>
('statsKey'='val','statsKey2',='val2')

Valid values for 'statsKey': numDVs, numNulls, avgSize, maxSize

The 'val' portion needs to be a number appropriate for the given stats
key (e.g., a long for numDVs, a float for avgSize).

The special value of '-1' is allowed to reset stats to 'unknown'.

The keys as well as the values are specified as string literals to be
consistent with the existing DDL for setting TBLPROPERTIES/SERDEPROPERTIES,
in particular, setting the 'numRows' table/partition property.

Testing: Ran the tests locally on exhaustive. Did private runs
on core/hdfs and core/S3.

Change-Id: I45cd8aa7241ea962788ba9ca7d0bbfd864c4304f
---
M common/thrift/JniCatalog.thrift
M fe/src/main/cup/sql-parser.cup
A fe/src/main/java/com/cloudera/impala/analysis/AlterTableSetColumnStats.java
M fe/src/main/java/com/cloudera/impala/analysis/AlterTableStmt.java
M fe/src/main/java/com/cloudera/impala/catalog/ColumnStats.java
M fe/src/main/java/com/cloudera/impala/catalog/KuduTable.java
M fe/src/main/java/com/cloudera/impala/common/RuntimeEnv.java
M fe/src/main/java/com/cloudera/impala/service/CatalogOpExecutor.java
M fe/src/test/java/com/cloudera/impala/analysis/AnalyzeDDLTest.java
M fe/src/test/java/com/cloudera/impala/analysis/ParserTest.java
M fe/src/test/java/com/cloudera/impala/testutil/TestUtils.java
A testdata/workloads/functional-query/queries/QueryTest/alter-table-set-column-stats.test
M tests/metadata/test_ddl.py
13 files changed, 606 insertions(+), 48 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/89/3189/9
-- 
To view, visit http://gerrit.cloudera.org:8080/3189
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I45cd8aa7241ea962788ba9ca7d0bbfd864c4304f
Gerrit-PatchSet: 9
Gerrit-Project: Impala
Gerrit-Branch: cdh5-2.6.0_5.8.0
Gerrit-Owner: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bharathv@cloudera.com>
Gerrit-Reviewer: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <marcel@cloudera.com>

Mime
View raw message