15 package com.cloudera.impala.analysis;
21 import com.cloudera.impala.thrift.TResetMetadataRequest;
22 import com.cloudera.impala.thrift.TTableName;
23 import com.google.common.base.Preconditions;
36 Preconditions.checkArgument(!isRefresh || name != null);
37 this.tableName_ =
name;
47 String dbName = analyzer.getTargetDbName(
tableName_);
54 if (!analyzer.dbContainsTable(dbName, tableName_.getTbl(),
Privilege.ANY)) {
63 .onTable(dbName, tableName_.getTbl()).any().toRequest());
72 StringBuilder result =
new StringBuilder();
74 result.append(
"INVALIDATE METADATA");
76 result.append(
"REFRESH");
80 return result.toString();
84 TResetMetadataRequest params =
new TResetMetadataRequest();
87 params.setTable_name(
new TTableName(
tableName_.
getDb(), tableName_.getTbl()));
static final String TBL_DOES_NOT_EXIST_ERROR_MSG