@Internal public abstract class AbstractSqlCallContext extends Object implements CallContext
CallContext
backed by Calcite abstractions.Modifier and Type | Class and Description |
---|---|
protected static interface |
AbstractSqlCallContext.LiteralValueAccessor
Helper interface for abstracting accessing literals.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractSqlCallContext(DataTypeFactory dataTypeFactory,
FunctionDefinition definition,
String name,
boolean isGroupedAggregation) |
Modifier and Type | Method and 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 to
ValueLiteralExpression.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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fail, getArgumentDataTypes, getArgumentValue, getOutputDataType, isArgumentLiteral, isArgumentNull, newValidationError
protected AbstractSqlCallContext(DataTypeFactory dataTypeFactory, FunctionDefinition definition, String name, boolean isGroupedAggregation)
public DataTypeFactory getDataTypeFactory()
CallContext
getDataTypeFactory
in interface CallContext
public FunctionDefinition getFunctionDefinition()
CallContext
getFunctionDefinition
in interface CallContext
public String getName()
CallContext
Note: The name is meant for debugging purposes only.
getName
in interface CallContext
public boolean isGroupedAggregation()
CallContext
E.g. SELECT COUNT(*) FROM t
is not a grouped aggregation but SELECT
COUNT(*) FROM t GROUP BY k
is.
isGroupedAggregation
in interface CallContext
protected static <T> T getLiteralValueAs(AbstractSqlCallContext.LiteralValueAccessor accessor, Class<T> clazz)
ValueLiteralExpression.getValueAs(Class)
.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.