Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
Public Member Functions | |
ScalarFunction (FunctionName fnName, ArrayList< Type > argTypes, Type retType, boolean hasVarArgs) | |
ScalarFunction (FunctionName fnName, List< Type > argTypes, Type retType, HdfsUri location, String symbolName, String initFnSymbol, String closeFnSymbol) | |
void | setSymbolName (String s) |
void | setPrepareFnSymbol (String s) |
void | setCloseFnSymbol (String s) |
String | getSymbolName () |
String | getPrepareFnSymbol () |
String | getCloseFnSymbol () |
TFunction | toThrift () |
FunctionName | getFunctionName () |
String | functionName () |
String | dbName () |
Type | getReturnType () |
Type[] | getArgs () |
int | getNumArgs () |
HdfsUri | getLocation () |
TFunctionBinaryType | getBinaryType () |
boolean | hasVarArgs () |
boolean | userVisible () |
Type | getVarArgsType () |
void | setName (FunctionName name) |
void | setLocation (HdfsUri loc) |
void | setBinaryType (TFunctionBinaryType type) |
void | setHasVarArgs (boolean v) |
void | setUserVisible (boolean b) |
String | signatureString () |
boolean | equals (Object o) |
boolean | compare (Function other, CompareMode mode) |
Function | promoteCharsToStrings () |
Function | selectClosestSuperType (List< Function > candidates) |
TCatalogObjectType | getCatalogObjectType () |
long | getCatalogVersion () |
void | setCatalogVersion (long newVersion) |
String | getName () |
boolean | isLoaded () |
String | lookupSymbol (String symbol, TSymbolType symbolType, Type retArgType, boolean hasVarArgs, Type...argTypes) throws AnalysisException |
String | lookupSymbol (String symbol, TSymbolType symbolType) throws AnalysisException |
Static Public Member Functions | |
static ScalarFunction | createBuiltin (String name, ArrayList< Type > argTypes, boolean hasVarArgs, Type retType, String symbol, String prepareFnSymbol, String closeFnSymbol, boolean isOperator) |
static ScalarFunction | createBuiltinOperator (String name, ArrayList< Type > argTypes, Type retType) |
static ScalarFunction | createBuiltinOperator (String name, String symbol, ArrayList< Type > argTypes, Type retType) |
static ScalarFunction | createBuiltin (String name, String symbol, ArrayList< Type > argTypes, boolean hasVarArgs, Type retType, boolean userVisible) |
static ScalarFunction | createBuiltinSearchDesc (String name, Type[] argTypes, boolean hasVarArgs) |
static Function | fromThrift (TFunction fn) |
static String | getUdfType (Type t) |
Private Attributes | |
String | symbolName_ |
String | prepareFnSymbol_ |
String | closeFnSymbol_ |
Internal representation of a scalar function.
Definition at line 33 of file ScalarFunction.java.
|
inline |
Definition at line 40 of file ScalarFunction.java.
Referenced by com.cloudera.impala.catalog.ScalarFunction.createBuiltin(), and com.cloudera.impala.catalog.ScalarFunction.createBuiltinSearchDesc().
|
inline |
Definition at line 45 of file ScalarFunction.java.
References com.cloudera.impala.catalog.ScalarFunction.setCloseFnSymbol(), com.cloudera.impala.catalog.Function.setLocation(), com.cloudera.impala.catalog.ScalarFunction.setPrepareFnSymbol(), and com.cloudera.impala.catalog.ScalarFunction.setSymbolName().
|
inlineinherited |
Definition at line 157 of file Function.java.
References com.cloudera.impala.catalog.Function.isIdentical(), com.cloudera.impala.catalog.Function.isIndistinguishable(), and com.cloudera.impala.catalog.Function.isSuperTypeOf().
Referenced by com.cloudera.impala.catalog.Function.equals().
|
inlinestatic |
Creates a builtin scalar function. This is a helper that wraps a few steps into one call.
Definition at line 59 of file ScalarFunction.java.
References com.cloudera.impala.catalog.Catalog.BUILTINS_DB, and com.cloudera.impala.catalog.ScalarFunction.ScalarFunction().
Referenced by com.cloudera.impala.catalog.Db.addScalarBuiltin(), and com.cloudera.impala.catalog.ScalarFunction.createBuiltinOperator().
|
inlinestatic |
|
inlinestatic |
Creates a builtin scalar operator function. This is a helper that wraps a few steps into one call. TODO: this needs to be kept in sync with what generates the be operator implementations. (gen_functions.py). Is there a better way to coordinate this.
Definition at line 102 of file ScalarFunction.java.
|
inlinestatic |
Definition at line 155 of file ScalarFunction.java.
References com.cloudera.impala.catalog.ScalarFunction.createBuiltin().
|
inlinestatic |
Create a function that is used to search the catalog for a matching builtin. Only the fields necessary for matching function prototypes are specified.
Definition at line 183 of file ScalarFunction.java.
References com.cloudera.impala.catalog.Catalog.BUILTINS_DB, com.cloudera.impala.catalog.Type.INVALID, and com.cloudera.impala.catalog.ScalarFunction.ScalarFunction().
|
inlineinherited |
|
inlineinherited |
Definition at line 151 of file Function.java.
References com.cloudera.impala.catalog.Function.compare(), and com.cloudera.impala.catalog.Function.CompareMode.IS_IDENTICAL.
|
inlinestaticinherited |
Definition at line 308 of file Function.java.
References com.cloudera.impala.analysis.FunctionName.fromThrift(), com.cloudera.impala.catalog.Type.fromThrift(), and com.cloudera.impala.catalog.Function.Function().
|
inlineinherited |
Definition at line 116 of file Function.java.
Referenced by com.cloudera.impala.service.MetadataOp.createFunctionResultRow(), and com.cloudera.impala.catalog.Db.removeFunction().
|
inlineinherited |
Definition at line 119 of file Function.java.
References com.cloudera.impala.catalog.Function.argTypes_.
Referenced by com.cloudera.impala.catalog.ScalarFunction.createBuiltin().
|
inlineinherited |
Definition at line 123 of file Function.java.
References com.cloudera.impala.catalog.Function.binaryType_.
Referenced by com.cloudera.impala.analysis.FunctionCallExpr.analyze().
|
inlineinherited |
Implements com.cloudera.impala.catalog.CatalogObject.
Definition at line 283 of file Function.java.
|
inlineinherited |
Implements com.cloudera.impala.catalog.CatalogObject.
Definition at line 286 of file Function.java.
References com.cloudera.impala.catalog.Function.catalogVersion_.
Referenced by com.cloudera.impala.catalog.ImpaladCatalog.addFunction(), and com.cloudera.impala.catalog.ImpaladCatalog.removeFunction().
|
inline |
Definition at line 199 of file ScalarFunction.java.
References com.cloudera.impala.catalog.ScalarFunction.closeFnSymbol_.
|
inlineinherited |
Definition at line 115 of file Function.java.
References com.cloudera.impala.catalog.Function.name_.
Referenced by com.cloudera.impala.catalog.CatalogServiceCatalog.addFunction(), and com.cloudera.impala.catalog.Function.getName().
|
inlineinherited |
Definition at line 122 of file Function.java.
References com.cloudera.impala.catalog.Function.location_.
|
inlineinherited |
Implements com.cloudera.impala.catalog.CatalogObject.
Definition at line 292 of file Function.java.
References com.cloudera.impala.catalog.Function.getFunctionName().
|
inlineinherited |
Definition at line 121 of file Function.java.
Referenced by com.cloudera.impala.analysis.CreateUdaStmt.analyze(), com.cloudera.impala.catalog.Function.isIndistinguishable(), and com.cloudera.impala.analysis.Expr.treeToThriftHelper().
|
inline |
Definition at line 198 of file ScalarFunction.java.
References com.cloudera.impala.catalog.ScalarFunction.prepareFnSymbol_.
|
inlineinherited |
Definition at line 118 of file Function.java.
References com.cloudera.impala.catalog.Function.retType_.
Referenced by com.cloudera.impala.analysis.CreateUdaStmt.analyze(), com.cloudera.impala.catalog.AggregateFunction.toThrift(), and com.cloudera.impala.catalog.Function.toThrift().
|
inline |
Definition at line 197 of file ScalarFunction.java.
References com.cloudera.impala.catalog.ScalarFunction.symbolName_.
|
inlinestaticinherited |
Definition at line 401 of file Function.java.
References com.cloudera.impala.catalog.Type.getPrimitiveType().
|
inlineinherited |
Definition at line 126 of file Function.java.
References com.cloudera.impala.catalog.Function.argTypes_, com.cloudera.impala.catalog.Function.hasVarArgs_, and com.cloudera.impala.catalog.Type.INVALID.
Referenced by com.cloudera.impala.catalog.Function.isIndistinguishable().
|
inlineinherited |
Definition at line 124 of file Function.java.
References com.cloudera.impala.catalog.Function.hasVarArgs_.
Referenced by com.cloudera.impala.analysis.CreateUdaStmt.analyze(), com.cloudera.impala.catalog.Function.lookupSymbol(), and com.cloudera.impala.analysis.Expr.treeToThriftHelper().
|
inlineinherited |
Implements com.cloudera.impala.catalog.CatalogObject.
Definition at line 342 of file Function.java.
|
inlineinherited |
Definition at line 348 of file Function.java.
References com.cloudera.impala.catalog.Function.binaryType_, com.cloudera.impala.analysis.HdfsUri.getLocation(), com.cloudera.impala.catalog.Function.hasVarArgs(), and com.cloudera.impala.catalog.Function.location_.
Referenced by com.cloudera.impala.catalog.Function.lookupSymbol().
|
inlineinherited |
Definition at line 394 of file Function.java.
References com.cloudera.impala.catalog.Function.lookupSymbol().
|
inlineinherited |
Converts any CHAR arguments to be STRING arguments
Definition at line 200 of file Function.java.
References com.cloudera.impala.catalog.PrimitiveType.CHAR, com.cloudera.impala.catalog.Function.Function(), com.cloudera.impala.catalog.Function.hasVarArgs_, com.cloudera.impala.catalog.Function.name_, com.cloudera.impala.catalog.Function.retType_, and com.cloudera.impala.catalog.Type.STRING.
Referenced by com.cloudera.impala.catalog.Function.selectClosestSuperType().
|
inlineinherited |
Given a list of functions which are a super type of this function, select the best match. This is the one which requires the fewest type promotions.
Definition at line 212 of file Function.java.
References com.cloudera.impala.catalog.Function.isIndistinguishable(), and com.cloudera.impala.catalog.Function.promoteCharsToStrings().
|
inlineinherited |
Definition at line 134 of file Function.java.
References com.cloudera.impala.catalog.Function.binaryType_.
|
inlineinherited |
Implements com.cloudera.impala.catalog.CatalogObject.
Definition at line 289 of file Function.java.
References com.cloudera.impala.catalog.Function.catalogVersion_.
|
inline |
Definition at line 195 of file ScalarFunction.java.
References com.cloudera.impala.catalog.ScalarFunction.closeFnSymbol_.
Referenced by com.cloudera.impala.catalog.ScalarFunction.ScalarFunction().
|
inlineinherited |
Definition at line 135 of file Function.java.
References com.cloudera.impala.catalog.Function.hasVarArgs_.
|
inlineinherited |
Definition at line 133 of file Function.java.
References com.cloudera.impala.catalog.Function.location_.
Referenced by com.cloudera.impala.catalog.AggregateFunction.AggregateFunction(), and com.cloudera.impala.catalog.ScalarFunction.ScalarFunction().
|
inlineinherited |
Definition at line 132 of file Function.java.
References impala.name, and com.cloudera.impala.catalog.Function.name_.
|
inline |
Definition at line 194 of file ScalarFunction.java.
References com.cloudera.impala.catalog.ScalarFunction.prepareFnSymbol_.
Referenced by com.cloudera.impala.catalog.ScalarFunction.ScalarFunction().
|
inline |
Definition at line 193 of file ScalarFunction.java.
References com.cloudera.impala.catalog.ScalarFunction.symbolName_.
Referenced by com.cloudera.impala.catalog.ScalarFunction.ScalarFunction().
|
inlineinherited |
Definition at line 136 of file Function.java.
References com.cloudera.impala.catalog.Function.userVisible_.
|
inlineinherited |
Definition at line 140 of file Function.java.
References com.cloudera.impala.catalog.Function.argTypes_, and com.cloudera.impala.catalog.Function.hasVarArgs_.
Referenced by com.cloudera.impala.analysis.CreateFunctionStmtBase.analyze(), com.cloudera.impala.service.MetadataOp.createFunctionResultRow(), com.cloudera.impala.service.CatalogOpExecutor.dropFunction(), com.cloudera.impala.service.Frontend.getFunctions(), and com.cloudera.impala.catalog.Function.toThrift().
|
inline |
Definition at line 202 of file ScalarFunction.java.
References com.cloudera.impala.catalog.ScalarFunction.closeFnSymbol_, com.cloudera.impala.catalog.ScalarFunction.prepareFnSymbol_, and com.cloudera.impala.catalog.ScalarFunction.symbolName_.
|
inlineinherited |
Definition at line 125 of file Function.java.
References com.cloudera.impala.catalog.Function.userVisible_.
Referenced by com.cloudera.impala.analysis.FunctionCallExpr.analyze(), and com.cloudera.impala.catalog.ScalarFunction.createBuiltin().
|
private |
Definition at line 38 of file ScalarFunction.java.
Referenced by com.cloudera.impala.catalog.ScalarFunction.getCloseFnSymbol(), com.cloudera.impala.catalog.ScalarFunction.setCloseFnSymbol(), and com.cloudera.impala.catalog.ScalarFunction.toThrift().
|
private |
Definition at line 37 of file ScalarFunction.java.
Referenced by com.cloudera.impala.catalog.ScalarFunction.getPrepareFnSymbol(), com.cloudera.impala.catalog.ScalarFunction.setPrepareFnSymbol(), and com.cloudera.impala.catalog.ScalarFunction.toThrift().
|
private |
Definition at line 36 of file ScalarFunction.java.
Referenced by com.cloudera.impala.catalog.ScalarFunction.getSymbolName(), com.cloudera.impala.catalog.ScalarFunction.setSymbolName(), and com.cloudera.impala.catalog.ScalarFunction.toThrift().