@Internal public class FunctionCatalog extends Object implements FunctionLookup
FunctionDefinition
s in catalogs.FunctionLookup.Result
Constructor and Description |
---|
FunctionCatalog(TableConfig config,
CatalogManager catalogManager,
ModuleManager moduleManager) |
Modifier and Type | Method and Description |
---|---|
void |
dropTempCatalogFunction(ObjectIdentifier identifier,
boolean ignoreIfNotExist)
Drop a temporary catalog function.
|
void |
dropTempSystemFunction(String funcName,
boolean ignoreIfNotExist)
Drop a temporary system function.
|
String[] |
getFunctions()
Get names of all functions, including temp system functions, system functions, temp catalog functions and catalog functions
in the current catalog and current database.
|
PlannerTypeInferenceUtil |
getPlannerTypeInferenceUtil()
Temporary utility until the new type inference is fully functional.
|
String[] |
getUserDefinedFunctions()
Get names of all user defined functions, including temp system functions, temp catalog functions and catalog functions
in the current catalog and current database.
|
boolean |
hasTemporaryCatalogFunction(ObjectIdentifier functionIdentifier)
Check whether a temporary catalog function is already registered.
|
boolean |
hasTemporarySystemFunction(String functionName)
Check whether a temporary system function is already registered.
|
Optional<FunctionLookup.Result> |
lookupFunction(UnresolvedIdentifier identifier)
Lookup a function by function identifier.
|
<T,ACC> void |
registerTempCatalogAggregateFunction(ObjectIdentifier oi,
UserDefinedAggregateFunction<T,ACC> function,
TypeInformation<T> resultType,
TypeInformation<ACC> accType) |
void |
registerTempCatalogScalarFunction(ObjectIdentifier oi,
ScalarFunction function) |
<T> void |
registerTempCatalogTableFunction(ObjectIdentifier oi,
TableFunction<T> function,
TypeInformation<T> resultType) |
<T,ACC> void |
registerTempSystemAggregateFunction(String name,
UserDefinedAggregateFunction<T,ACC> function,
TypeInformation<T> resultType,
TypeInformation<ACC> accType) |
void |
registerTempSystemScalarFunction(String name,
ScalarFunction function) |
<T> void |
registerTempSystemTableFunction(String name,
TableFunction<T> function,
TypeInformation<T> resultType) |
void |
setPlannerTypeInferenceUtil(PlannerTypeInferenceUtil plannerTypeInferenceUtil) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
lookupBuiltInFunction
public FunctionCatalog(TableConfig config, CatalogManager catalogManager, ModuleManager moduleManager)
public void setPlannerTypeInferenceUtil(PlannerTypeInferenceUtil plannerTypeInferenceUtil)
public void registerTempSystemScalarFunction(String name, ScalarFunction function)
public <T> void registerTempSystemTableFunction(String name, TableFunction<T> function, TypeInformation<T> resultType)
public <T,ACC> void registerTempSystemAggregateFunction(String name, UserDefinedAggregateFunction<T,ACC> function, TypeInformation<T> resultType, TypeInformation<ACC> accType)
public void registerTempCatalogScalarFunction(ObjectIdentifier oi, ScalarFunction function)
public <T> void registerTempCatalogTableFunction(ObjectIdentifier oi, TableFunction<T> function, TypeInformation<T> resultType)
public <T,ACC> void registerTempCatalogAggregateFunction(ObjectIdentifier oi, UserDefinedAggregateFunction<T,ACC> function, TypeInformation<T> resultType, TypeInformation<ACC> accType)
public boolean hasTemporaryCatalogFunction(ObjectIdentifier functionIdentifier)
functionIdentifier
- the object identifier of functionpublic boolean hasTemporarySystemFunction(String functionName)
functionName
- the name of the functionpublic void dropTempSystemFunction(String funcName, boolean ignoreIfNotExist)
funcName
- name of the functionignoreIfNotExist
- Flag to specify behavior when the function does not exist:
if set to false, throw an exception,
if set to true, do nothing.public void dropTempCatalogFunction(ObjectIdentifier identifier, boolean ignoreIfNotExist)
identifier
- identifier of the functionignoreIfNotExist
- Flag to specify behavior when the function does not exist:
if set to false, throw an exception,
if set to true, do nothing.public String[] getUserDefinedFunctions()
public String[] getFunctions()
public Optional<FunctionLookup.Result> lookupFunction(UnresolvedIdentifier identifier)
FunctionLookup
lookupFunction
in interface FunctionLookup
public PlannerTypeInferenceUtil getPlannerTypeInferenceUtil()
FunctionLookup
getPlannerTypeInferenceUtil
in interface FunctionLookup
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.