Class ContextSqlValidator

All Implemented Interfaces:
SqlValidator, SqlValidatorWithHints

public class ContextSqlValidator extends SqlValidatorImpl
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.

  • Constructor Details

    • ContextSqlValidator

      public ContextSqlValidator(CalcitePrepare.Context context, boolean mutable)
      Create a ContextSqlValidator.
      context - Prepare context.
      mutable - Whether to get the mutable schema.