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

Classes

enum  CompareMode
 

Public Member Functions

 Function (FunctionName name, Type[] argTypes, Type retType, boolean varArgs)
 
 Function (FunctionName name, List< Type > args, Type retType, boolean varArgs)
 
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 ()
 
TFunction toThrift ()
 
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 Function fromThrift (TFunction fn)
 
static String getUdfType (Type t)
 

Private Member Functions

boolean isSuperTypeOf (Function other)
 
boolean isIdentical (Function o)
 
boolean isIndistinguishable (Function o)
 

Private Attributes

FunctionName name_
 
final Type retType_
 
Type[] argTypes_
 
boolean hasVarArgs_
 
boolean userVisible_
 
HdfsUri location_
 
TFunctionBinaryType binaryType_
 
long catalogVersion_ = Catalog.INITIAL_CATALOG_VERSION
 

Detailed Description

Base class for all functions.

Definition at line 41 of file Function.java.

Constructor & Destructor Documentation

com.cloudera.impala.catalog.Function.Function ( FunctionName  name,
Type[]  argTypes,
Type  retType,
boolean  varArgs 
)
inline
com.cloudera.impala.catalog.Function.Function ( FunctionName  name,
List< Type args,
Type  retType,
boolean  varArgs 
)
inline

Definition at line 105 of file Function.java.

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

Member Function Documentation

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

Implements com.cloudera.impala.catalog.CatalogObject.

Definition at line 283 of file Function.java.

long com.cloudera.impala.catalog.Function.getCatalogVersion ( )
inline
FunctionName com.cloudera.impala.catalog.Function.getFunctionName ( )
inline
HdfsUri com.cloudera.impala.catalog.Function.getLocation ( )
inline

Definition at line 122 of file Function.java.

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

String com.cloudera.impala.catalog.Function.getName ( )
inline
static String com.cloudera.impala.catalog.Function.getUdfType ( Type  t)
inlinestatic
boolean com.cloudera.impala.catalog.Function.isLoaded ( )
inline

Implements com.cloudera.impala.catalog.CatalogObject.

Definition at line 342 of file Function.java.

boolean com.cloudera.impala.catalog.Function.isSuperTypeOf ( Function  other)
inlineprivate

Returns true if 'this' is a supertype of 'other'. Each argument in other must be implicitly castable to the matching argument in this. TODO: look into how we resolve implicitly castable functions. Is there a rule for "most" compatible or maybe return an error if it is ambiguous?

Definition at line 173 of file Function.java.

References com.cloudera.impala.catalog.Function.argTypes_, com.cloudera.impala.analysis.FunctionName.equals(), com.cloudera.impala.catalog.Function.hasVarArgs_, com.cloudera.impala.catalog.Type.isImplicitlyCastable(), com.cloudera.impala.catalog.Type.matchesType(), and com.cloudera.impala.catalog.Function.name_.

Referenced by com.cloudera.impala.catalog.Function.compare().

String com.cloudera.impala.catalog.Function.lookupSymbol ( String  symbol,
TSymbolType  symbolType,
Type  retArgType,
boolean  hasVarArgs,
Type...  argTypes 
) throws AnalysisException
inline
String com.cloudera.impala.catalog.Function.lookupSymbol ( String  symbol,
TSymbolType  symbolType 
) throws AnalysisException
inline
Function com.cloudera.impala.catalog.Function.selectClosestSuperType ( List< Function candidates)
inline

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)
inline

Definition at line 134 of file Function.java.

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

void com.cloudera.impala.catalog.Function.setCatalogVersion ( long  newVersion)
inline
void com.cloudera.impala.catalog.Function.setHasVarArgs ( boolean  v)
inline

Definition at line 135 of file Function.java.

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

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

Definition at line 132 of file Function.java.

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

void com.cloudera.impala.catalog.Function.setUserVisible ( boolean  b)
inline

Definition at line 136 of file Function.java.

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

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

Member Data Documentation

long com.cloudera.impala.catalog.Function.catalogVersion_ = Catalog.INITIAL_CATALOG_VERSION
private
final Type com.cloudera.impala.catalog.Function.retType_
private
boolean com.cloudera.impala.catalog.Function.userVisible_
private

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