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

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_
 

Detailed Description

Internal representation of a scalar function.

Definition at line 33 of file ScalarFunction.java.

Constructor & Destructor Documentation

com.cloudera.impala.catalog.ScalarFunction.ScalarFunction ( FunctionName  fnName,
ArrayList< Type argTypes,
Type  retType,
boolean  hasVarArgs 
)
inline
com.cloudera.impala.catalog.ScalarFunction.ScalarFunction ( FunctionName  fnName,
List< Type argTypes,
Type  retType,
HdfsUri  location,
String  symbolName,
String  initFnSymbol,
String  closeFnSymbol 
)
inline

Member Function Documentation

boolean com.cloudera.impala.catalog.Function.compare ( Function  other,
CompareMode  mode 
)
inlineinherited
static ScalarFunction com.cloudera.impala.catalog.ScalarFunction.createBuiltin ( String  name,
ArrayList< Type argTypes,
boolean  hasVarArgs,
Type  retType,
String  symbol,
String  prepareFnSymbol,
String  closeFnSymbol,
boolean  isOperator 
)
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().

static ScalarFunction com.cloudera.impala.catalog.ScalarFunction.createBuiltin ( String  name,
String  symbol,
ArrayList< Type argTypes,
boolean  hasVarArgs,
Type  retType,
boolean  userVisible 
)
inlinestatic
static ScalarFunction com.cloudera.impala.catalog.ScalarFunction.createBuiltinOperator ( String  name,
ArrayList< Type argTypes,
Type  retType 
)
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.

static ScalarFunction com.cloudera.impala.catalog.ScalarFunction.createBuiltinOperator ( String  name,
String  symbol,
ArrayList< Type argTypes,
Type  retType 
)
inlinestatic
static ScalarFunction com.cloudera.impala.catalog.ScalarFunction.createBuiltinSearchDesc ( String  name,
Type[]  argTypes,
boolean  hasVarArgs 
)
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().

boolean com.cloudera.impala.catalog.Function.equals ( Object  o)
inlineinherited
static Function com.cloudera.impala.catalog.Function.fromThrift ( TFunction  fn)
inlinestaticinherited
String com.cloudera.impala.catalog.Function.functionName ( )
inlineinherited
Type [] com.cloudera.impala.catalog.Function.getArgs ( )
inlineinherited
TFunctionBinaryType com.cloudera.impala.catalog.Function.getBinaryType ( )
inlineinherited
TCatalogObjectType com.cloudera.impala.catalog.Function.getCatalogObjectType ( )
inlineinherited

Implements com.cloudera.impala.catalog.CatalogObject.

Definition at line 283 of file Function.java.

long com.cloudera.impala.catalog.Function.getCatalogVersion ( )
inlineinherited
String com.cloudera.impala.catalog.ScalarFunction.getCloseFnSymbol ( )
inline
FunctionName com.cloudera.impala.catalog.Function.getFunctionName ( )
inlineinherited
HdfsUri com.cloudera.impala.catalog.Function.getLocation ( )
inlineinherited

Definition at line 122 of file Function.java.

References com.cloudera.impala.catalog.Function.location_.

String com.cloudera.impala.catalog.Function.getName ( )
inlineinherited
int com.cloudera.impala.catalog.Function.getNumArgs ( )
inlineinherited
String com.cloudera.impala.catalog.ScalarFunction.getPrepareFnSymbol ( )
inline
String com.cloudera.impala.catalog.ScalarFunction.getSymbolName ( )
inline
static String com.cloudera.impala.catalog.Function.getUdfType ( Type  t)
inlinestaticinherited
boolean com.cloudera.impala.catalog.Function.isLoaded ( )
inlineinherited

Implements com.cloudera.impala.catalog.CatalogObject.

Definition at line 342 of file Function.java.

String com.cloudera.impala.catalog.Function.lookupSymbol ( String  symbol,
TSymbolType  symbolType,
Type  retArgType,
boolean  hasVarArgs,
Type...  argTypes 
) throws AnalysisException
inlineinherited
String com.cloudera.impala.catalog.Function.lookupSymbol ( String  symbol,
TSymbolType  symbolType 
) throws AnalysisException
inlineinherited
Function com.cloudera.impala.catalog.Function.selectClosestSuperType ( List< Function candidates)
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().

void com.cloudera.impala.catalog.Function.setBinaryType ( TFunctionBinaryType  type)
inlineinherited

Definition at line 134 of file Function.java.

References com.cloudera.impala.catalog.Function.binaryType_.

void com.cloudera.impala.catalog.Function.setCatalogVersion ( long  newVersion)
inlineinherited
void com.cloudera.impala.catalog.ScalarFunction.setCloseFnSymbol ( String  s)
inline
void com.cloudera.impala.catalog.Function.setHasVarArgs ( boolean  v)
inlineinherited

Definition at line 135 of file Function.java.

References com.cloudera.impala.catalog.Function.hasVarArgs_.

void com.cloudera.impala.catalog.Function.setLocation ( HdfsUri  loc)
inlineinherited
void com.cloudera.impala.catalog.Function.setName ( FunctionName  name)
inlineinherited

Definition at line 132 of file Function.java.

References impala.name, and com.cloudera.impala.catalog.Function.name_.

void com.cloudera.impala.catalog.ScalarFunction.setPrepareFnSymbol ( String  s)
inline
void com.cloudera.impala.catalog.ScalarFunction.setSymbolName ( String  s)
inline
void com.cloudera.impala.catalog.Function.setUserVisible ( boolean  b)
inlineinherited

Definition at line 136 of file Function.java.

References com.cloudera.impala.catalog.Function.userVisible_.

boolean com.cloudera.impala.catalog.Function.userVisible ( )
inlineinherited

Member Data Documentation


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