Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
com.cloudera.impala.analysis.DropTableOrViewStmt Class Reference
Inheritance diagram for com.cloudera.impala.analysis.DropTableOrViewStmt:
Collaboration diagram for com.cloudera.impala.analysis.DropTableOrViewStmt:

Public Member Functions

 DropTableOrViewStmt (TableName tableName, boolean ifExists, boolean dropTable)
 
String toSql ()
 
TDropTableOrViewParams toThrift ()
 
void analyze (Analyzer analyzer) throws AnalysisException
 
String getDb ()
 
String getTbl ()
 
boolean getIfExists ()
 
boolean isDropTable ()
 
void setIsExplain ()
 
boolean isExplain ()
 

Protected Attributes

final TableName tableName_
 
final boolean ifExists_
 
final boolean dropTable_
 
String dbName_
 
boolean isExplain_ = false
 

Detailed Description

Represents a DROP TABLE/VIEW [IF EXISTS] statement

Definition at line 28 of file DropTableOrViewStmt.java.

Constructor & Destructor Documentation

com.cloudera.impala.analysis.DropTableOrViewStmt.DropTableOrViewStmt ( TableName  tableName,
boolean  ifExists,
boolean  dropTable 
)
inline

Constructor for building the DROP TABLE/VIEW statement

Definition at line 41 of file DropTableOrViewStmt.java.

Member Function Documentation

void com.cloudera.impala.analysis.DropTableOrViewStmt.analyze ( Analyzer  analyzer) throws AnalysisException
inline
  1. Checks that the user has privileges to DROP the given table/view
  2. Checks that the database and table exists
  3. Checks that the table type (TABLE/VIEW) matches the DROP TABLE/VIEW statement Note: Do not analyze tableName because we prefer to report an error indicating that the table/view does not exist even if the table/view name is invalid.

Implements com.cloudera.impala.analysis.ParseNode.

Definition at line 71 of file DropTableOrViewStmt.java.

References com.cloudera.impala.analysis.DropTableOrViewStmt.dbName_, com.cloudera.impala.authorization.Privilege.DROP, com.cloudera.impala.analysis.DropTableOrViewStmt.dropTable_, com.cloudera.impala.analysis.DropTableOrViewStmt.getTbl(), com.cloudera.impala.analysis.DropTableOrViewStmt.ifExists_, and com.cloudera.impala.analysis.DropTableOrViewStmt.tableName_.

String com.cloudera.impala.analysis.DropTableOrViewStmt.getDb ( )
inline

Can only be called after analysis. Returns the name of the database that the target drop table resides in.

Definition at line 94 of file DropTableOrViewStmt.java.

References com.cloudera.impala.analysis.DropTableOrViewStmt.dbName_.

Referenced by com.cloudera.impala.analysis.DropTableOrViewStmt.toThrift().

boolean com.cloudera.impala.analysis.DropTableOrViewStmt.getIfExists ( )
inline
String com.cloudera.impala.analysis.DropTableOrViewStmt.getTbl ( )
inline
boolean com.cloudera.impala.analysis.DropTableOrViewStmt.isDropTable ( )
inline
boolean com.cloudera.impala.analysis.StatementBase.isExplain ( )
inlineinherited
void com.cloudera.impala.analysis.StatementBase.setIsExplain ( )
inlineinherited
TDropTableOrViewParams com.cloudera.impala.analysis.DropTableOrViewStmt.toThrift ( )
inline

Member Data Documentation

String com.cloudera.impala.analysis.DropTableOrViewStmt.dbName_
protected
final boolean com.cloudera.impala.analysis.DropTableOrViewStmt.dropTable_
protected
final boolean com.cloudera.impala.analysis.DropTableOrViewStmt.ifExists_
protected
final TableName com.cloudera.impala.analysis.DropTableOrViewStmt.tableName_
protected

The documentation for this class was generated from the following file: