Class SqlQuantifyOperator


public class SqlQuantifyOperator extends SqlInOperator
Definition of the SQL ALL and SOMEoperators.

Each is used in combination with a relational operator: <, , >, , =, <>.

ANY is a synonym for SOME.

  • Field Details

    • comparisonKind

      public final SqlKind comparisonKind
  • Method Details

    • deriveType

      public RelDataType deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call)
      Description copied from class: SqlOperator
      Derives the type of a call to this operator.

      This method is an intrinsic part of the validation process so, unlike SqlOperator.inferReturnType(org.apache.calcite.sql.SqlOperatorBinding), specific operators would not typically override this method.

      Overrides:
      deriveType in class SqlInOperator
      Parameters:
      validator - Validator
      scope - Scope of validation
      call - Call to this operator
      Returns:
      Type of call
    • tryDeriveTypeForCollection

      public @Nullable RelDataType tryDeriveTypeForCollection(SqlValidator validator, SqlValidatorScope scope, SqlCall call)
      Derive type for SOME(collection expression), ANY (collection expression).
      Parameters:
      validator - Validator
      scope - Scope of validation
      call - Call to this operator
      Returns:
      If SOME or ALL is applied to a collection, then the function returns type of call, otherwise it returns null.