Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
Public Member Functions | |
BuiltinsDb (String name, Catalog catalog) | |
void | setIsSystemDb (boolean b) |
boolean | isSystemDb () |
TDatabase | toThrift () |
String | getName () |
TCatalogObjectType | getCatalogObjectType () |
void | addTable (Table table) |
List< String > | getAllTableNames () |
boolean | containsTable (String tableName) |
Table | getTable (String tblName) |
Table | removeTable (String tableName) |
int | numFunctions () |
boolean | containsFunction (String name) |
Function | getFunction (Function desc, Function.CompareMode mode) |
Function | getFunction (String signatureString) |
boolean | addFunction (Function fn) |
Function | removeFunction (Function desc) |
Function | removeFunction (String signatureStr) |
void | addScalarBuiltin (String fnName, String symbol, boolean varArgs, Type retType, Type...args) |
void | addScalarBuiltin (String fnName, String symbol, String prepareFnSymbol, String closeFnSymbol, boolean varArgs, Type retType, Type...args) |
void | addBuiltin (Function fn) |
List< Function > | getFunctions (TFunctionCategory category, PatternMatcher fnPattern) |
long | getCatalogVersion () |
void | setCatalogVersion (long newVersion) |
Catalog | getParentCatalog () |
boolean | isLoaded () |
Static Public Member Functions | |
static Db | fromTDatabase (TDatabase db, Catalog parentCatalog) |
Protected Member Functions | |
HashMap< String, List< Function > > | getAllFunctions () |
Private Member Functions | |
void | initBuiltins () |
void | initAggregateBuiltins () |
Static Private Attributes | |
static final Map< Type, String > | SAMPLE_INIT_SYMBOL |
static final Map< Type, String > | SAMPLE_SERIALIZE_SYMBOL |
static final Map< Type, String > | SAMPLE_MERGE_SYMBOL |
static final Map< Type, String > | SAMPLE_UPDATE_SYMBOL |
static final Map< Type, String > | SAMPLE_FINALIZE_SYMBOL |
static final Map< Type, String > | APPX_MEDIAN_FINALIZE_SYMBOL |
static final Map< Type, String > | HISTOGRAM_FINALIZE_SYMBOL |
static final Map< Type, String > | HLL_UPDATE_SYMBOL |
static final Map< Type, String > | PC_UPDATE_SYMBOL |
static final Map< Type, String > | PCSA_UPDATE_SYMBOL |
static final Map< Type, String > | MIN_UPDATE_SYMBOL |
static final Map< Type, String > | MAX_UPDATE_SYMBOL |
static final Map< Type, String > | STDDEV_UPDATE_SYMBOL |
static final Map< Type, String > | OFFSET_FN_INIT_SYMBOL |
static final Map< Type, String > | OFFSET_FN_UPDATE_SYMBOL |
static final Map< Type, String > | LAST_VALUE_UPDATE_SYMBOL |
static final Map< Type, String > | FIRST_VALUE_REWRITE_UPDATE_SYMBOL |
static final Map< Type, String > | LAST_VALUE_REMOVE_SYMBOL |
static final Map< Type, String > | FIRST_VALUE_UPDATE_SYMBOL |
Definition at line 32 of file BuiltinsDb.java.
|
inline |
Definition at line 33 of file BuiltinsDb.java.
References com.cloudera.impala.catalog.BuiltinsDb.initBuiltins(), and com.cloudera.impala.catalog.Db.setIsSystemDb().
|
inlineinherited |
Adds a builtin to this database. The function must not already exist.
Definition at line 247 of file Db.java.
References com.cloudera.impala.catalog.Db.addFunction(), com.cloudera.impala.catalog.Db.getFunction(), com.cloudera.impala.catalog.Function.CompareMode.IS_IDENTICAL, and com.cloudera.impala.catalog.Db.isSystemDb().
Referenced by com.cloudera.impala.catalog.Db.addScalarBuiltin().
|
inlineinherited |
See comment in Catalog.
Definition at line 179 of file Db.java.
References com.cloudera.impala.catalog.Db.functions_, com.cloudera.impala.catalog.Db.getFunction(), and com.cloudera.impala.catalog.Db.getName().
Referenced by com.cloudera.impala.catalog.Db.addBuiltin(), and com.cloudera.impala.catalog.CatalogServiceCatalog.addFunction().
|
inlineinherited |
|
inlineinherited |
Add a builtin with the specified name and signatures to this db.
Definition at line 236 of file Db.java.
References com.cloudera.impala.catalog.Db.addBuiltin(), com.cloudera.impala.catalog.ScalarFunction.createBuiltin(), and com.cloudera.impala.catalog.Db.isSystemDb().
|
inlineinherited |
|
inlineinherited |
See comment in Catalog.
Definition at line 131 of file Db.java.
References com.cloudera.impala.catalog.Db.functions_, and impala.name.
Referenced by com.cloudera.impala.analysis.FunctionName.analyze(), and com.cloudera.impala.analysis.FunctionCallExpr.analyze().
|
inlineinherited |
Definition at line 100 of file Db.java.
Referenced by com.cloudera.impala.catalog.CatalogServiceCatalog.invalidateTable().
|
inlinestaticinherited |
Creates a Db object with no tables based on the given TDatabase thrift struct.
Definition at line 75 of file Db.java.
References com.cloudera.impala.catalog.Db.Db().
|
inlineprotectedinherited |
Returns a map of functionNames to list of (overloaded) functions with that name. This is not thread safe so a higher level lock must be taken while iterating over the returned functions.
Definition at line 259 of file Db.java.
References com.cloudera.impala.catalog.Db.functions_.
|
inlineinherited |
Gets all table names in the table cache.
Definition at line 96 of file Db.java.
Referenced by com.cloudera.impala.catalog.CatalogServiceCatalog.getCatalogObjects(), and com.cloudera.impala.testutil.BlockIdGenerator.main().
|
inlineinherited |
Implements com.cloudera.impala.catalog.CatalogObject.
|
inlineinherited |
Implements com.cloudera.impala.catalog.CatalogObject.
Definition at line 292 of file Db.java.
References com.cloudera.impala.catalog.Db.catalogVersion_.
Referenced by com.cloudera.impala.catalog.ImpaladCatalog.addDb(), com.cloudera.impala.catalog.CatalogServiceCatalog.getCatalogObjects(), and com.cloudera.impala.catalog.ImpaladCatalog.removeDb().
|
inlineinherited |
Definition at line 140 of file Db.java.
References com.cloudera.impala.catalog.Db.functions_.
Referenced by com.cloudera.impala.catalog.Db.addBuiltin(), com.cloudera.impala.catalog.Db.addFunction(), and com.cloudera.impala.catalog.Db.removeFunction().
|
inlineinherited |
Definition at line 165 of file Db.java.
References com.cloudera.impala.catalog.Db.functions_.
|
inlineinherited |
Returns all functions that match 'fnPattern'.
Definition at line 266 of file Db.java.
References com.cloudera.impala.catalog.Db.functions_, and com.cloudera.impala.util.PatternMatcher.matches().
Referenced by com.cloudera.impala.catalog.CatalogServiceCatalog.getCatalogObjects().
|
inlineinherited |
Implements com.cloudera.impala.catalog.CatalogObject.
Definition at line 81 of file Db.java.
Referenced by com.cloudera.impala.catalog.Catalog.addDb(), com.cloudera.impala.catalog.Db.addFunction(), com.cloudera.impala.catalog.AggregateFunction.createAnalyticBuiltin(), com.cloudera.impala.catalog.AggregateFunction.createBuiltin(), com.cloudera.impala.service.CatalogOpExecutor.dropDatabase(), com.cloudera.impala.service.MetadataOp.getDbsMetadata(), com.cloudera.impala.catalog.Table.getFullName(), com.cloudera.impala.catalog.Table.getTableName(), com.cloudera.impala.catalog.View.init(), com.cloudera.impala.catalog.TableLoader.load(), com.cloudera.impala.catalog.HdfsTable.load(), com.cloudera.impala.catalog.ImpaladCatalog.removeDb(), com.cloudera.impala.catalog.CatalogTest.TestColSchema(), com.cloudera.impala.catalog.IncompleteTable.toThrift(), com.cloudera.impala.catalog.Table.toThrift(), com.cloudera.impala.catalog.DataSourceTable.toThriftDescriptor(), com.cloudera.impala.catalog.HBaseTable.toThriftDescriptor(), and com.cloudera.impala.catalog.HdfsTable.toThriftDescriptor().
|
inlineinherited |
Definition at line 295 of file Db.java.
References com.cloudera.impala.catalog.Db.parentCatalog_.
|
inlineinherited |
|
inlineprivate |
Definition at line 509 of file BuiltinsDb.java.
References com.cloudera.impala.catalog.BuiltinsDb.APPX_MEDIAN_FINALIZE_SYMBOL, com.cloudera.impala.catalog.Type.BIGINT, com.cloudera.impala.catalog.PrimitiveType.CHAR, com.cloudera.impala.catalog.ScalarType.createCharType(), com.cloudera.impala.catalog.Type.DECIMAL, com.cloudera.impala.catalog.Type.DOUBLE, com.cloudera.impala.catalog.Type.getSupportedTypes(), com.cloudera.impala.catalog.BuiltinsDb.HISTOGRAM_FINALIZE_SYMBOL, com.cloudera.impala.catalog.BuiltinsDb.HLL_UPDATE_SYMBOL, com.cloudera.impala.catalog.BuiltinsDb.LAST_VALUE_REMOVE_SYMBOL, com.cloudera.impala.catalog.BuiltinsDb.MAX_UPDATE_SYMBOL, com.cloudera.impala.catalog.BuiltinsDb.MIN_UPDATE_SYMBOL, com.cloudera.impala.catalog.BuiltinsDb.OFFSET_FN_INIT_SYMBOL, com.cloudera.impala.catalog.BuiltinsDb.PC_UPDATE_SYMBOL, com.cloudera.impala.catalog.BuiltinsDb.PCSA_UPDATE_SYMBOL, com.cloudera.impala.catalog.BuiltinsDb.SAMPLE_FINALIZE_SYMBOL, com.cloudera.impala.catalog.BuiltinsDb.SAMPLE_INIT_SYMBOL, com.cloudera.impala.catalog.BuiltinsDb.SAMPLE_MERGE_SYMBOL, com.cloudera.impala.catalog.BuiltinsDb.STDDEV_UPDATE_SYMBOL, com.cloudera.impala.catalog.Type.STRING, com.cloudera.impala.catalog.Type.TIMESTAMP, and com.cloudera.impala.catalog.PrimitiveType.VARCHAR.
Referenced by com.cloudera.impala.catalog.BuiltinsDb.initBuiltins().
|
inlineprivate |
Initializes all the builtins.
Definition at line 42 of file BuiltinsDb.java.
References com.cloudera.impala.catalog.BuiltinsDb.initAggregateBuiltins().
Referenced by com.cloudera.impala.catalog.BuiltinsDb.BuiltinsDb().
|
inlineinherited |
Implements com.cloudera.impala.catalog.CatalogObject.
|
inlineinherited |
Definition at line 79 of file Db.java.
References com.cloudera.impala.catalog.Db.isSystemDb_.
Referenced by com.cloudera.impala.catalog.Db.addBuiltin(), com.cloudera.impala.catalog.Db.addScalarBuiltin(), and com.cloudera.impala.analysis.Analyzer.checkSystemDbAccess().
|
inlineinherited |
Returns the number of functions in this database.
Definition at line 122 of file Db.java.
References com.cloudera.impala.catalog.Db.functions_.
Referenced by com.cloudera.impala.analysis.DropDbStmt.analyze(), and com.cloudera.impala.service.CatalogOpExecutor.dropDatabase().
See comment in Catalog.
Definition at line 198 of file Db.java.
References com.cloudera.impala.catalog.Function.functionName(), com.cloudera.impala.catalog.Db.functions_, and com.cloudera.impala.catalog.Db.getFunction().
Referenced by com.cloudera.impala.catalog.Db.removeFunction().
|
inlineinherited |
Removes a Function with the matching signature string. Returns the removed Function if a Function was removed as a result of this call, null otherwise. TODO: Move away from using signature strings and instead use Function IDs.
Definition at line 216 of file Db.java.
References com.cloudera.impala.catalog.Db.functions_, com.cloudera.impala.catalog.Db.getFunction(), and com.cloudera.impala.catalog.Db.removeFunction().
|
inlineinherited |
|
inlineinherited |
Implements com.cloudera.impala.catalog.CatalogObject.
Definition at line 294 of file Db.java.
References com.cloudera.impala.catalog.Db.catalogVersion_.
|
inlineinherited |
Definition at line 70 of file Db.java.
References com.cloudera.impala.catalog.Db.isSystemDb_.
Referenced by com.cloudera.impala.catalog.BuiltinsDb.BuiltinsDb().
|
inlineinherited |
Definition at line 80 of file Db.java.
References com.cloudera.impala.catalog.Db.thriftDb_.
|
staticprivate |
Definition at line 178 of file BuiltinsDb.java.
Referenced by com.cloudera.impala.catalog.BuiltinsDb.initAggregateBuiltins().
|
staticprivate |
Definition at line 433 of file BuiltinsDb.java.
|
staticprivate |
Definition at line 481 of file BuiltinsDb.java.
|
staticprivate |
Definition at line 202 of file BuiltinsDb.java.
Referenced by com.cloudera.impala.catalog.BuiltinsDb.initAggregateBuiltins().
|
staticprivate |
Definition at line 226 of file BuiltinsDb.java.
Referenced by com.cloudera.impala.catalog.BuiltinsDb.initAggregateBuiltins().
|
staticprivate |
Definition at line 457 of file BuiltinsDb.java.
Referenced by com.cloudera.impala.catalog.BuiltinsDb.initAggregateBuiltins().
|
staticprivate |
Definition at line 409 of file BuiltinsDb.java.
|
staticprivate |
Definition at line 322 of file BuiltinsDb.java.
Referenced by com.cloudera.impala.catalog.BuiltinsDb.initAggregateBuiltins().
|
staticprivate |
Definition at line 298 of file BuiltinsDb.java.
Referenced by com.cloudera.impala.catalog.BuiltinsDb.initAggregateBuiltins().
|
staticprivate |
Definition at line 361 of file BuiltinsDb.java.
Referenced by com.cloudera.impala.catalog.BuiltinsDb.initAggregateBuiltins().
|
staticprivate |
Definition at line 385 of file BuiltinsDb.java.
|
staticprivate |
Definition at line 250 of file BuiltinsDb.java.
Referenced by com.cloudera.impala.catalog.BuiltinsDb.initAggregateBuiltins().
|
staticprivate |
Definition at line 274 of file BuiltinsDb.java.
Referenced by com.cloudera.impala.catalog.BuiltinsDb.initAggregateBuiltins().
|
staticprivate |
Definition at line 154 of file BuiltinsDb.java.
Referenced by com.cloudera.impala.catalog.BuiltinsDb.initAggregateBuiltins().
|
staticprivate |
Definition at line 58 of file BuiltinsDb.java.
Referenced by com.cloudera.impala.catalog.BuiltinsDb.initAggregateBuiltins().
|
staticprivate |
Definition at line 106 of file BuiltinsDb.java.
Referenced by com.cloudera.impala.catalog.BuiltinsDb.initAggregateBuiltins().
|
staticprivate |
Definition at line 82 of file BuiltinsDb.java.
|
staticprivate |
Definition at line 130 of file BuiltinsDb.java.
|
staticprivate |
Definition at line 346 of file BuiltinsDb.java.
Referenced by com.cloudera.impala.catalog.BuiltinsDb.initAggregateBuiltins().