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

Public Member Functions

 ShowTablesStmt ()
 
 ShowTablesStmt (String pattern)
 
 ShowTablesStmt (String database, String pattern)
 
String getPattern ()
 
String getDb ()
 
String toSql ()
 
void analyze (Analyzer analyzer) throws AnalysisException
 
TShowTablesParams toThrift ()
 
void setIsExplain ()
 
boolean isExplain ()
 

Protected Attributes

boolean isExplain_ = false
 

Private Attributes

final String pattern_
 
final String parsedDb_
 
String postAnalysisDb_
 

Detailed Description

Representation of a SHOW TABLES [pattern] statement. Acceptable syntax:

SHOW TABLES SHOW TABLES "pattern" SHOW TABLES LIKE "pattern" SHOW TABLES IN database SHOW TABLES IN database "pattern" SHOW TABLES IN database LIKE "pattern"

In Hive, the 'LIKE' is optional. Also SHOW TABLES unquotedpattern is accepted by the parser but returns no results. We don't support that syntax.

Definition at line 36 of file ShowTablesStmt.java.

Constructor & Destructor Documentation

com.cloudera.impala.analysis.ShowTablesStmt.ShowTablesStmt ( )
inline

Default constructor, which creates a show statement with the default database and no pattern (which returns all tables in the default database).

Definition at line 50 of file ShowTablesStmt.java.

com.cloudera.impala.analysis.ShowTablesStmt.ShowTablesStmt ( String  pattern)
inline

Constructs a show statement against the default database using the supplied pattern.

Definition at line 58 of file ShowTablesStmt.java.

com.cloudera.impala.analysis.ShowTablesStmt.ShowTablesStmt ( String  database,
String  pattern 
)
inline

General purpose constructor which builds a show statement that matches table names against a given pattern in the supplied database.

If pattern is null, all tables in the supplied database match. If database is null, the default database is searched.

Definition at line 69 of file ShowTablesStmt.java.

Member Function Documentation

void com.cloudera.impala.analysis.ShowTablesStmt.analyze ( Analyzer  analyzer) throws AnalysisException
inline

Perform semantic analysis of node and all of its children. Throws exception if any errors found.

Parameters
analyzer
Exceptions
AnalysisException

Implements com.cloudera.impala.analysis.ParseNode.

Definition at line 104 of file ShowTablesStmt.java.

References com.cloudera.impala.authorization.Privilege.ANY, com.cloudera.impala.analysis.Analyzer.DB_DOES_NOT_EXIST_ERROR_MSG, com.cloudera.impala.analysis.ShowTablesStmt.parsedDb_, and com.cloudera.impala.analysis.ShowTablesStmt.postAnalysisDb_.

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

Can only be called after analysis, returns the name of the database that this show will search against.

Definition at line 81 of file ShowTablesStmt.java.

References com.cloudera.impala.analysis.ShowTablesStmt.postAnalysisDb_.

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

String com.cloudera.impala.analysis.ShowTablesStmt.getPattern ( )
inline
boolean com.cloudera.impala.analysis.StatementBase.isExplain ( )
inlineinherited
void com.cloudera.impala.analysis.StatementBase.setIsExplain ( )
inlineinherited
String com.cloudera.impala.analysis.ShowTablesStmt.toSql ( )
inline
TShowTablesParams com.cloudera.impala.analysis.ShowTablesStmt.toThrift ( )
inline

Member Data Documentation

final String com.cloudera.impala.analysis.ShowTablesStmt.parsedDb_
private
final String com.cloudera.impala.analysis.ShowTablesStmt.pattern_
private
String com.cloudera.impala.analysis.ShowTablesStmt.postAnalysisDb_
private

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