Class SqlTypeExplicitPrecedenceList

java.lang.Object
org.apache.calcite.sql.type.SqlTypeExplicitPrecedenceList
All Implemented Interfaces:
RelDataTypePrecedenceList

public class SqlTypeExplicitPrecedenceList extends Object implements RelDataTypePrecedenceList
SqlTypeExplicitPrecedenceList implements the RelDataTypePrecedenceList interface via an explicit list of SqlTypeName entries.
  • Constructor Details

    • SqlTypeExplicitPrecedenceList

      public SqlTypeExplicitPrecedenceList(Iterable<SqlTypeName> typeNames)
  • Method Details

    • containsType

      public boolean containsType(RelDataType type)
      Description copied from interface: RelDataTypePrecedenceList
      Determines whether a type appears in this precedence list.
      Specified by:
      containsType in interface RelDataTypePrecedenceList
      Parameters:
      type - type to check
      Returns:
      true iff this list contains type
    • compareTypePrecedence

      public int compareTypePrecedence(RelDataType type1, RelDataType type2)
      Description copied from interface: RelDataTypePrecedenceList
      Compares the precedence of two types.

      The list must contain both types.

      Specified by:
      compareTypePrecedence in interface RelDataTypePrecedenceList
      Parameters:
      type1 - first type to compare
      type2 - second type to compare
      Returns:
      positive if type1 has higher precedence; negative if type2 has higher precedence; 0 if types have equal precedence