Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
Public Member Functions | |
CreateTableStmt (TableName tableName, List< ColumnDef > columnDefs, List< ColumnDef > partitionColumnDefs, boolean isExternal, String comment, RowFormat rowFormat, THdfsFileFormat fileFormat, HdfsUri location, HdfsCachingOp cachingOp, boolean ifNotExists, Map< String, String > tblProperties, Map< String, String > serdeProperties) | |
CreateTableStmt (CreateTableStmt other) | |
CreateTableStmt | clone () |
String | getTbl () |
TableName | getTblName () |
List< ColumnDef > | getColumnDefs () |
List< ColumnDef > | getPartitionColumnDefs () |
String | getComment () |
boolean | isExternal () |
boolean | getIfNotExists () |
HdfsUri | getLocation () |
void | setLocation (HdfsUri location) |
THdfsFileFormat | getFileFormat () |
RowFormat | getRowFormat () |
Map< String, String > | getTblProperties () |
Map< String, String > | getSerdeProperties () |
String | getOwner () |
String | getDb () |
String | toSql () |
TCreateTableParams | toThrift () |
void | analyze (Analyzer analyzer) throws AnalysisException |
void | setIsExplain () |
boolean | isExplain () |
Static Public Member Functions | |
static void | unescapeProperties (Map< String, String > propertyMap) |
Protected Attributes | |
boolean | isExplain_ = false |
Private Member Functions | |
void | analyzeColumnDefs (Analyzer analyzer) throws AnalysisException |
List< ColumnDef > | analyzeAvroSchema (Analyzer analyzer) throws AnalysisException |
void | analyzeRowFormatValue (String value) throws AnalysisException |
Private Attributes | |
final ArrayList< ColumnDef > | columnDefs_ |
final String | comment_ |
final boolean | isExternal_ |
final boolean | ifNotExists_ |
final THdfsFileFormat | fileFormat_ |
final ArrayList< ColumnDef > | partitionColDefs_ |
final RowFormat | rowFormat_ |
final TableName | tableName_ |
final Map< String, String > | tblProperties_ |
final Map< String, String > | serdeProperties_ |
final HdfsCachingOp | cachingOp_ |
HdfsUri | location_ |
String | dbName_ |
String | owner_ |
Represents a CREATE TABLE statement.
Definition at line 45 of file CreateTableStmt.java.
|
inline |
Builds a CREATE TABLE statement
tableName | - Name of the new table |
columnDefs | - List of column definitions for the table |
partitionColumnDefs | - List of partition column definitions for the table |
isExternal | - If true, the table's data will be preserved if dropped. |
comment | - Comment to attach to the table |
rowFormat | - Custom row format of the table. Use RowFormat.DEFAULT_ROW_FORMAT to specify default row format. |
fileFormat | - File format of the table |
location | - The HDFS location of where the table data will stored. |
cachingOp | - The HDFS caching op that should be applied to this table. |
ifNotExists | - If true, no errors are thrown if the table already exists. |
tblProperties | - Optional map of key/values to persist with table metadata. |
serdeProperties | - Optional map of key/values to persist with table serde metadata. |
Definition at line 80 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.isExternal(), com.cloudera.impala.analysis.CreateTableStmt.serdeProperties_, com.cloudera.impala.analysis.CreateTableStmt.tblProperties_, and com.cloudera.impala.analysis.CreateTableStmt.unescapeProperties().
Referenced by com.cloudera.impala.analysis.CreateTableStmt.clone().
|
inline |
Copy c'tor.
Definition at line 110 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.cachingOp_, com.cloudera.impala.analysis.CreateTableStmt.columnDefs_, com.cloudera.impala.analysis.CreateTableStmt.comment_, com.cloudera.impala.analysis.CreateTableStmt.fileFormat_, com.cloudera.impala.analysis.CreateTableStmt.ifNotExists_, com.cloudera.impala.analysis.CreateTableStmt.isExternal_, com.cloudera.impala.analysis.CreateTableStmt.location_, com.cloudera.impala.analysis.CreateTableStmt.partitionColDefs_, com.cloudera.impala.analysis.CreateTableStmt.rowFormat_, com.cloudera.impala.analysis.CreateTableStmt.serdeProperties_, com.cloudera.impala.analysis.CreateTableStmt.tableName_, and com.cloudera.impala.analysis.CreateTableStmt.tblProperties_.
|
inline |
Perform semantic analysis of node and all of its children. Throws exception if any errors found.
analyzer |
AnalysisException |
Implements com.cloudera.impala.analysis.ParseNode.
Definition at line 188 of file CreateTableStmt.java.
References com.cloudera.impala.authorization.Privilege.ALL, com.cloudera.impala.analysis.CreateTableStmt.analyzeAvroSchema(), com.cloudera.impala.analysis.CreateTableStmt.analyzeColumnDefs(), com.cloudera.impala.analysis.CreateTableStmt.analyzeRowFormatValue(), com.cloudera.impala.analysis.CreateTableStmt.cachingOp_, com.cloudera.impala.analysis.CreateTableStmt.columnDefs_, com.cloudera.impala.authorization.Privilege.CREATE, com.cloudera.impala.analysis.CreateTableStmt.dbName_, com.cloudera.impala.analysis.CreateTableStmt.fileFormat_, com.cloudera.impala.catalog.RowFormat.getEscapeChar(), com.cloudera.impala.catalog.RowFormat.getFieldDelimiter(), com.cloudera.impala.catalog.RowFormat.getLineDelimiter(), com.cloudera.impala.analysis.TableName.getTbl(), com.cloudera.impala.analysis.CreateTableStmt.getTbl(), com.cloudera.impala.analysis.CreateTableStmt.ifNotExists_, com.cloudera.impala.analysis.CreateTableStmt.location_, com.cloudera.impala.analysis.CreateTableStmt.owner_, com.cloudera.impala.analysis.CreateTableStmt.rowFormat_, com.cloudera.impala.analysis.CreateTableStmt.tableName_, and com.cloudera.impala.analysis.Analyzer.TBL_ALREADY_EXISTS_ERROR_MSG.
|
inlineprivate |
Analyzes the Avro schema and compares it with the columnDefs_ to detect inconsistencies. Returns a list of column descriptors that should be used for creating the table (possibly identical to columnDefs_).
Definition at line 263 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.columnDefs_, com.cloudera.impala.analysis.CreateTableStmt.dbName_, com.cloudera.impala.analysis.CreateTableStmt.fileFormat_, com.cloudera.impala.analysis.ColumnDef.getColName(), com.cloudera.impala.analysis.ColumnDef.getType(), com.cloudera.impala.analysis.CreateTableStmt.serdeProperties_, com.cloudera.impala.analysis.CreateTableStmt.tblProperties_, and com.cloudera.impala.analysis.CreateTableStmt.toSql().
Referenced by com.cloudera.impala.analysis.CreateTableStmt.analyze().
|
inlineprivate |
Analyzes columnDefs_ and partitionColDefs_ checking whether all column names are unique.
Definition at line 237 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.columnDefs_, and com.cloudera.impala.analysis.CreateTableStmt.partitionColDefs_.
Referenced by com.cloudera.impala.analysis.CreateTableStmt.analyze().
|
inlineprivate |
Definition at line 349 of file CreateTableStmt.java.
References com.cloudera.impala.catalog.HdfsStorageDescriptor.parseDelim().
Referenced by com.cloudera.impala.analysis.CreateTableStmt.analyze().
|
inline |
Definition at line 126 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.CreateTableStmt().
|
inline |
Definition at line 130 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.columnDefs_.
Referenced by com.cloudera.impala.analysis.CreateTableDataSrcStmt.analyze(), com.cloudera.impala.analysis.CreateTableLikeFileStmt.analyze(), com.cloudera.impala.analysis.ToSqlUtils.getCreateTableSql(), com.cloudera.impala.catalog.Type.parseColumnType(), and com.cloudera.impala.analysis.CreateTableStmt.toThrift().
|
inline |
Definition at line 132 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.comment_.
Referenced by com.cloudera.impala.analysis.ToSqlUtils.getCreateTableSql(), and com.cloudera.impala.analysis.CreateTableLikeFileStmt.toSql().
|
inline |
Can only be called after analysis, returns the name of the database the table will be created within.
Definition at line 155 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.dbName_.
Referenced by com.cloudera.impala.analysis.CreateTableAsSelectStmt.analyze(), com.cloudera.impala.analysis.ToSqlUtils.getCreateTableSql(), com.cloudera.impala.analysis.CreateTableLikeFileStmt.toSql(), and com.cloudera.impala.analysis.CreateTableStmt.toThrift().
|
inline |
Definition at line 137 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.fileFormat_.
Referenced by com.cloudera.impala.analysis.CreateTableAsSelectStmt.analyze(), com.cloudera.impala.analysis.ToSqlUtils.getCreateTableSql(), and com.cloudera.impala.analysis.CreateTableLikeFileStmt.toSql().
|
inline |
Definition at line 134 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.ifNotExists_.
Referenced by com.cloudera.impala.analysis.ToSqlUtils.getCreateTableSql(), com.cloudera.impala.analysis.CreateTableLikeFileStmt.toSql(), and com.cloudera.impala.analysis.CreateTableStmt.toThrift().
|
inline |
Definition at line 135 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.location_.
Referenced by com.cloudera.impala.analysis.CreateTableAsSelectStmt.analyze(), com.cloudera.impala.analysis.ToSqlUtils.getCreateTableSql(), and com.cloudera.impala.analysis.CreateTableLikeFileStmt.toSql().
|
inline |
Can only be called after analysis, returns the owner of this table (the user from the current session).
Definition at line 146 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.owner_.
Referenced by com.cloudera.impala.analysis.CreateTableStmt.toThrift().
|
inline |
Definition at line 131 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.partitionColDefs_.
Referenced by com.cloudera.impala.analysis.ToSqlUtils.getCreateTableSql(), and com.cloudera.impala.analysis.CreateTableStmt.toThrift().
|
inline |
Definition at line 138 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.rowFormat_.
Referenced by com.cloudera.impala.analysis.CreateTableLikeFileStmt.toSql().
|
inline |
Definition at line 140 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.serdeProperties_.
Referenced by com.cloudera.impala.analysis.ToSqlUtils.getCreateTableSql(), and com.cloudera.impala.analysis.CreateTableLikeFileStmt.toSql().
|
inline |
Definition at line 128 of file CreateTableStmt.java.
Referenced by com.cloudera.impala.analysis.AnalyzerTest.addTestTable(), com.cloudera.impala.analysis.CreateTableStmt.analyze(), com.cloudera.impala.analysis.CreateTableLikeFileStmt.toSql(), and com.cloudera.impala.analysis.CreateTableStmt.toThrift().
|
inline |
Definition at line 129 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.tableName_.
Referenced by com.cloudera.impala.analysis.CreateTableAsSelectStmt.CreateTableAsSelectStmt().
|
inline |
Definition at line 139 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.tblProperties_.
Referenced by com.cloudera.impala.analysis.CreateTableDataSrcStmt.analyze(), and com.cloudera.impala.analysis.CreateTableLikeFileStmt.toSql().
|
inlineinherited |
Definition at line 43 of file StatementBase.java.
References com.cloudera.impala.analysis.StatementBase.isExplain_.
|
inline |
Definition at line 133 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.isExternal_.
Referenced by com.cloudera.impala.analysis.CreateTableStmt.CreateTableStmt(), com.cloudera.impala.analysis.CreateTableLikeFileStmt.toSql(), and com.cloudera.impala.analysis.CreateTableStmt.toThrift().
|
inlineinherited |
Definition at line 42 of file StatementBase.java.
References com.cloudera.impala.analysis.StatementBase.isExplain_.
|
inline |
Definition at line 136 of file CreateTableStmt.java.
|
inline |
Implements com.cloudera.impala.analysis.ParseNode.
Definition at line 161 of file CreateTableStmt.java.
Referenced by com.cloudera.impala.analysis.CreateTableStmt.analyzeAvroSchema().
|
inline |
Definition at line 165 of file CreateTableStmt.java.
References com.cloudera.impala.analysis.CreateTableStmt.cachingOp_, com.cloudera.impala.analysis.CreateTableStmt.comment_, com.cloudera.impala.analysis.CreateTableStmt.fileFormat_, com.cloudera.impala.analysis.CreateTableStmt.getColumnDefs(), com.cloudera.impala.analysis.CreateTableStmt.getDb(), com.cloudera.impala.analysis.CreateTableStmt.getIfNotExists(), com.cloudera.impala.analysis.CreateTableStmt.getOwner(), com.cloudera.impala.analysis.CreateTableStmt.getPartitionColumnDefs(), com.cloudera.impala.analysis.CreateTableStmt.getTbl(), com.cloudera.impala.analysis.CreateTableStmt.isExternal(), com.cloudera.impala.analysis.CreateTableStmt.location_, com.cloudera.impala.analysis.CreateTableStmt.serdeProperties_, and com.cloudera.impala.analysis.CreateTableStmt.tblProperties_.
|
inlinestatic |
Unescapes all values in the property map.
Definition at line 361 of file CreateTableStmt.java.
Referenced by com.cloudera.impala.analysis.CreateTableStmt.CreateTableStmt().
|
private |
Definition at line 56 of file CreateTableStmt.java.
Referenced by com.cloudera.impala.analysis.CreateTableStmt.analyze(), com.cloudera.impala.analysis.CreateTableStmt.CreateTableStmt(), and com.cloudera.impala.analysis.CreateTableStmt.toThrift().
|
private |
Definition at line 46 of file CreateTableStmt.java.
Referenced by com.cloudera.impala.analysis.CreateTableStmt.analyze(), com.cloudera.impala.analysis.CreateTableStmt.analyzeAvroSchema(), com.cloudera.impala.analysis.CreateTableStmt.analyzeColumnDefs(), com.cloudera.impala.analysis.CreateTableStmt.CreateTableStmt(), and com.cloudera.impala.analysis.CreateTableStmt.getColumnDefs().
|
private |
Definition at line 47 of file CreateTableStmt.java.
Referenced by com.cloudera.impala.analysis.CreateTableStmt.CreateTableStmt(), com.cloudera.impala.analysis.CreateTableStmt.getComment(), and com.cloudera.impala.analysis.CreateTableStmt.toThrift().
|
private |
Definition at line 60 of file CreateTableStmt.java.
Referenced by com.cloudera.impala.analysis.CreateTableStmt.analyze(), com.cloudera.impala.analysis.CreateTableStmt.analyzeAvroSchema(), and com.cloudera.impala.analysis.CreateTableStmt.getDb().
|
private |
Definition at line 50 of file CreateTableStmt.java.
Referenced by com.cloudera.impala.analysis.CreateTableStmt.analyze(), com.cloudera.impala.analysis.CreateTableStmt.analyzeAvroSchema(), com.cloudera.impala.analysis.CreateTableStmt.CreateTableStmt(), com.cloudera.impala.analysis.CreateTableStmt.getFileFormat(), and com.cloudera.impala.analysis.CreateTableStmt.toThrift().
|
private |
Definition at line 49 of file CreateTableStmt.java.
Referenced by com.cloudera.impala.analysis.CreateTableStmt.analyze(), com.cloudera.impala.analysis.CreateTableStmt.CreateTableStmt(), and com.cloudera.impala.analysis.CreateTableStmt.getIfNotExists().
|
protectedinherited |
|
private |
Definition at line 48 of file CreateTableStmt.java.
Referenced by com.cloudera.impala.analysis.CreateTableStmt.CreateTableStmt(), and com.cloudera.impala.analysis.CreateTableStmt.isExternal().
|
private |
Definition at line 57 of file CreateTableStmt.java.
Referenced by com.cloudera.impala.analysis.CreateTableStmt.analyze(), com.cloudera.impala.analysis.CreateTableStmt.CreateTableStmt(), com.cloudera.impala.analysis.CreateTableStmt.getLocation(), and com.cloudera.impala.analysis.CreateTableStmt.toThrift().
|
private |
Definition at line 61 of file CreateTableStmt.java.
Referenced by com.cloudera.impala.analysis.CreateTableStmt.analyze(), and com.cloudera.impala.analysis.CreateTableStmt.getOwner().
|
private |
|
private |
Definition at line 52 of file CreateTableStmt.java.
Referenced by com.cloudera.impala.analysis.CreateTableStmt.analyze(), com.cloudera.impala.analysis.CreateTableStmt.CreateTableStmt(), and com.cloudera.impala.analysis.CreateTableStmt.getRowFormat().
|
private |
Definition at line 55 of file CreateTableStmt.java.
Referenced by com.cloudera.impala.analysis.CreateTableStmt.analyzeAvroSchema(), com.cloudera.impala.analysis.CreateTableStmt.CreateTableStmt(), com.cloudera.impala.analysis.CreateTableStmt.getSerdeProperties(), and com.cloudera.impala.analysis.CreateTableStmt.toThrift().
|
private |
Definition at line 53 of file CreateTableStmt.java.
Referenced by com.cloudera.impala.analysis.CreateTableStmt.analyze(), com.cloudera.impala.analysis.CreateTableStmt.CreateTableStmt(), and com.cloudera.impala.analysis.CreateTableStmt.getTblName().
|
private |
Definition at line 54 of file CreateTableStmt.java.
Referenced by com.cloudera.impala.analysis.CreateTableStmt.analyzeAvroSchema(), com.cloudera.impala.analysis.CreateTableStmt.CreateTableStmt(), com.cloudera.impala.analysis.CreateTableStmt.getTblProperties(), and com.cloudera.impala.analysis.CreateTableStmt.toThrift().