Package org.apache.calcite.jdbc
Class ContextSqlValidator
java.lang.Object
org.apache.calcite.sql.validate.SqlValidatorImpl
org.apache.calcite.jdbc.ContextSqlValidator
- All Implemented Interfaces:
SqlValidator
,SqlValidatorWithHints
A SqlValidator with schema and type factory of the given
CalcitePrepare.Context
.
This class is only used to derive data type for DDL sql node.
Usually we deduce query sql node data type(i.e. the SqlSelect
)
during the validation phrase. DDL nodes don't have validation,
they can be executed directly through
DdlExecutor
.
During the execution, SqlDataTypeSpec
uses
this validator to derive its type.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.calcite.sql.validate.SqlValidatorImpl
SqlValidatorImpl.DmlNamespace, SqlValidatorImpl.FunctionParamInfo, SqlValidatorImpl.IdInfo, SqlValidatorImpl.Status
Nested classes/interfaces inherited from interface org.apache.calcite.sql.validate.SqlValidator
SqlValidator.Config
-
Field Summary
Fields inherited from class org.apache.calcite.sql.validate.SqlValidatorImpl
callToOperandTypesMap, functionCallStack, idPositions, namespaces, scopes, timeFrameSet, TRACER, typeFactory, unknownType, UPDATE_ANON_PREFIX, UPDATE_SRC_ALIAS, UPDATE_TGT_ALIAS
-
Constructor Summary
ConstructorDescriptionContextSqlValidator
(CalcitePrepare.Context context, boolean mutable) Create aContextSqlValidator
. -
Method Summary
Methods inherited from class org.apache.calcite.sql.validate.SqlValidatorImpl
addToSelectList, checkTypeAssignment, config, createMatchRecognizeNameSpace, createPivotNameSpace, createSelectNamespace, createSetopNamespace, createSourceSelectForDelete, createSourceSelectForUpdate, createTargetRowType, createUnpivotNameSpace, declareCursor, deriveAlias, deriveConstructorType, deriveType, expand, expandOrderExpr, expandSelectExpr, expandStar, extendedExpandGroupBy, getAggregate, getCatalogReader, getConformance, getCursorScope, getEmptyScope, getFieldOrigins, getFromScope, getGroupScope, getHavingScope, getJoinScope, getLambdaScope, getLogicalSourceRowType, getLogicalTargetRowType, getMatchRecognizeScope, getMeasureScope, getNamespace, getOperatorTable, getOrderScope, getOriginal, getOverScope, getParameterRowType, getParentCursor, getRawSelectScope, getSelectScope, getSelfJoinExprForUpdate, getTimeFrameSet, getTypeCoercion, getTypeFactory, getUnknownType, getValidatedNodeType, getValidatedNodeTypeIfKnown, getValidatedOperandTypes, getValidationErrorFunction, getWhereScope, getWindowByName, getWithScope, handleUnresolvedFunction, inferUnknownTypes, isAggregate, isAggregate, isNestedAggregateWindow, isOverAggregateWindow, isSystemField, lookupHints, lookupNameCompletionHints, lookupQualifiedName, makeNullaryCall, newValidationError, performUnconditionalRewrites, popFunctionCall, pushFunctionCall, registerNamespace, registerQuery, removeValidatedNodeType, resolveLiteral, resolveWindow, setOriginal, setValidatedNodeType, shouldAllowIntermediateOrderBy, shouldAllowOverRelation, transform, usingNames, validate, validateAggregateParams, validateCall, validateDataType, validateDelete, validateDynamicParam, validateFeature, validateFrom, validateGroupClause, validateHavingClause, validateIdentifier, validateInsert, validateIntervalQualifier, validateJoin, validateLambda, validateLiteral, validateMatchRecognize, validateMerge, validateModality, validateNamespace, validateOrderList, validateOver, validateParameterizedExpression, validatePivot, validateQualifyClause, validateQuery, validateSelect, validateSelectList, validateSequenceValue, validateTableFunction, validateTimeFrame, validateUnnest, validateUnpivot, validateUpdate, validateValues, validateWhereClause, validateWhereOrOn, validateWindow, validateWindowClause, validateWith, validateWithItem
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.calcite.sql.validate.SqlValidator
getTypeMappingRule, resolveWindow
-
Constructor Details
-
ContextSqlValidator
Create aContextSqlValidator
.- Parameters:
context
- Prepare context.mutable
- Whether to get the mutable schema.
-