Class AbstractSqlCallContext
- java.lang.Object
-
- org.apache.flink.table.planner.functions.inference.AbstractSqlCallContext
-
- All Implemented Interfaces:
CallContext
- Direct Known Subclasses:
CallBindingCallContext
,LookupCallContext
,OperatorBindingCallContext
@Internal public abstract class AbstractSqlCallContext extends Object implements CallContext
ACallContext
backed by Calcite abstractions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
AbstractSqlCallContext.LiteralValueAccessor
Helper interface for abstracting accessing literals.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSqlCallContext(DataTypeFactory dataTypeFactory, FunctionDefinition definition, String name, boolean isGroupedAggregation)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.protected static <T> T
getLiteralValueAs(AbstractSqlCallContext.LiteralValueAccessor accessor, Class<T> clazz)
Bridges toValueLiteralExpression.getValueAs(Class)
.String
getName()
Returns the function's name usually referencing the function in a catalog.boolean
isGroupedAggregation()
Returns whether the function call happens as part of an aggregation that defines grouping columns.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.table.types.inference.CallContext
fail, getArgumentDataTypes, getArgumentValue, getOutputDataType, isArgumentLiteral, isArgumentNull, newValidationError
-
-
-
-
Constructor Detail
-
AbstractSqlCallContext
protected AbstractSqlCallContext(DataTypeFactory dataTypeFactory, FunctionDefinition definition, String name, boolean isGroupedAggregation)
-
-
Method Detail
-
getDataTypeFactory
public DataTypeFactory getDataTypeFactory()
Description copied from interface:CallContext
Enables to lookup types in a catalog and resolve RAW types.- Specified by:
getDataTypeFactory
in interfaceCallContext
-
getFunctionDefinition
public FunctionDefinition getFunctionDefinition()
Description copied from interface:CallContext
Returns the function definition that defines the function currently being called.- Specified by:
getFunctionDefinition
in interfaceCallContext
-
getName
public String getName()
Description copied from interface:CallContext
Returns the function's name usually referencing the function in a catalog.Note: The name is meant for debugging purposes only.
- Specified by:
getName
in interfaceCallContext
-
isGroupedAggregation
public boolean isGroupedAggregation()
Description copied from interface:CallContext
Returns whether the function call happens as part of an aggregation that defines grouping columns.E.g.
SELECT COUNT(*) FROM t
is not a grouped aggregation butSELECT COUNT(*) FROM t GROUP BY k
is.- Specified by:
isGroupedAggregation
in interfaceCallContext
-
getLiteralValueAs
protected static <T> T getLiteralValueAs(AbstractSqlCallContext.LiteralValueAccessor accessor, Class<T> clazz)
Bridges toValueLiteralExpression.getValueAs(Class)
.
-
-