@Internal public final class UnknownCallContext extends Object implements CallContext
CallContext with unknown data types.| 构造器和说明 |
|---|
UnknownCallContext(DataTypeFactory typeFactory,
String name,
FunctionDefinition functionDefinition,
int argumentCount,
boolean isGroupedAggregation) |
| 限定符和类型 | 方法和说明 |
|---|---|
List<DataType> |
getArgumentDataTypes()
Returns a resolved list of the call's argument types.
|
<T> Optional<T> |
getArgumentValue(int pos,
Class<T> clazz)
Returns the literal value of the argument at the given position, given that the argument is a
literal, is not null, and can be expressed as an instance of the provided class.
|
DataTypeFactory |
getDataTypeFactory()
Enables to lookup types in a catalog and resolve RAW types.
|
FunctionDefinition |
getFunctionDefinition()
Returns the function definition that defines the function currently being called.
|
String |
getName()
Returns the function's name usually referencing the function in a catalog.
|
Optional<DataType> |
getOutputDataType()
Returns the inferred output data type of the function call.
|
boolean |
isArgumentLiteral(int pos)
Returns whether the argument at the given position is a value literal.
|
boolean |
isArgumentNull(int pos)
Returns
true if the argument at the given position is a literal and null,
false otherwise. |
boolean |
isGroupedAggregation()
Returns whether the function call happens as part of an aggregation that defines grouping
columns.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewValidationErrorpublic UnknownCallContext(DataTypeFactory typeFactory, String name, FunctionDefinition functionDefinition, int argumentCount, boolean isGroupedAggregation)
public DataTypeFactory getDataTypeFactory()
CallContextgetDataTypeFactory 在接口中 CallContextpublic FunctionDefinition getFunctionDefinition()
CallContextgetFunctionDefinition 在接口中 CallContextpublic boolean isArgumentLiteral(int pos)
CallContextisArgumentLiteral 在接口中 CallContextpublic boolean isArgumentNull(int pos)
CallContexttrue if the argument at the given position is a literal and null,
false otherwise.
Use CallContext.isArgumentLiteral(int) before to check if the argument is actually a literal.
isArgumentNull 在接口中 CallContextpublic <T> Optional<T> getArgumentValue(int pos, Class<T> clazz)
CallContextIt supports conversions to default conversion classes of LogicalTypes.
This method should not be called with other classes.
Use CallContext.isArgumentLiteral(int) before to check if the argument is actually a literal.
getArgumentValue 在接口中 CallContextpublic String getName()
CallContextNote: The name is meant for debugging purposes only.
getName 在接口中 CallContextpublic List<DataType> getArgumentDataTypes()
CallContextgetArgumentDataTypes 在接口中 CallContextpublic Optional<DataType> getOutputDataType()
CallContextIt does this by inferring the input argument data type using ArgumentTypeStrategy.inferArgumentType(CallContext, int, boolean) of a wrapping call (if
available) where this function call is an argument. For example, takes_string(this_function(NULL)) would lead to a DataTypes.STRING() because the
wrapping call expects a string argument.
getOutputDataType 在接口中 CallContextpublic boolean isGroupedAggregation()
CallContextE.g. SELECT COUNT(*) FROM t is not a grouped aggregation but SELECT
COUNT(*) FROM t GROUP BY k is.
isGroupedAggregation 在接口中 CallContextCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.