15 package com.cloudera.impala.analysis;
20 import com.cloudera.impala.thrift.TDropStatsParams;
21 import com.cloudera.impala.thrift.TTableName;
22 import com.google.common.base.Preconditions;
41 this.tableName_ = tableName;
45 this.tableName_ = tableName;
46 this.partitionSpec_ = partSpec;
51 StringBuilder sb =
new StringBuilder(
"DROP ");
55 sb.append(tableName_.toSql());
57 sb.append(
" INCREMENTAL STATS ");
59 sb.append(tableName_.toSql());
60 sb.append(partitionSpec_.toSql());
66 TDropStatsParams params =
new TDropStatsParams();
67 params.setTable_name(
new TTableName(
getDb(),
getTbl()));
70 params.setPartition_spec(partitionSpec_.toThrift());
83 Preconditions.checkNotNull(table);
87 partitionSpec_.setPartitionShouldExist();
88 partitionSpec_.analyze(analyzer);
97 Preconditions.checkNotNull(
dbName_);
101 public String
getTbl() {
return tableName_.getTbl(); }
DropStatsStmt(TableName tableName)
DropStatsStmt(TableName tableName, PartitionSpec partSpec)
PartitionSpec partitionSpec_
final TableName tableName_
TDropStatsParams toThrift()
void analyze(Analyzer analyzer)