public enum SqlTypeFamily extends Enum<SqlTypeFamily> implements RelDataTypeFamily
The primary family categorization is a complete disjoint
partitioning of SQL types into families, where two types are members of the
same primary family iff instances of the two types can be the operands of an
SQL equality predicate such as WHERE v1 = v2. Primary families
are returned by RelDataType.getFamily().
There is also a secondary family categorization which overlaps with the primary categorization. It is used in type strategies for more specific or more general categorization than the primary families. Secondary families are never returned by RelDataType.getFamily().
| Enum Constant and Description |
|---|
ANY |
APPROXIMATE_NUMERIC |
ARRAY |
BINARY |
BOOLEAN |
CHARACTER |
COLUMN_LIST |
CURSOR |
DATE |
DATETIME |
DATETIME_INTERVAL |
DECIMAL |
EXACT_NUMERIC |
GEO |
IGNORE
Like ANY, but do not even validate the operand.
|
INTEGER |
INTERVAL_DAY_TIME |
INTERVAL_YEAR_MONTH |
MAP |
MULTISET |
NULL |
NUMERIC |
STRING |
TIME |
TIMESTAMP |
| Modifier and Type | Method and Description |
|---|---|
List<SqlTypeFamily> |
allowableDifferenceTypes()
For this type family, returns the allow types of the difference between
two values of this family.
|
boolean |
contains(RelDataType type) |
@Nullable RelDataType |
getDefaultConcreteType(RelDataTypeFactory factory)
Return the default
RelDataType that belongs to this family. |
static @Nullable SqlTypeFamily |
getFamilyForJdbcType(int jdbcType)
Gets the primary family containing a JDBC type.
|
Collection<SqlTypeName> |
getTypeNames()
Returns the collection of
SqlTypeNames included in this family. |
static SqlTypeFamily |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SqlTypeFamily[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SqlTypeFamily CHARACTER
public static final SqlTypeFamily BINARY
public static final SqlTypeFamily NUMERIC
public static final SqlTypeFamily DATE
public static final SqlTypeFamily TIME
public static final SqlTypeFamily TIMESTAMP
public static final SqlTypeFamily BOOLEAN
public static final SqlTypeFamily INTERVAL_YEAR_MONTH
public static final SqlTypeFamily INTERVAL_DAY_TIME
public static final SqlTypeFamily STRING
public static final SqlTypeFamily APPROXIMATE_NUMERIC
public static final SqlTypeFamily EXACT_NUMERIC
public static final SqlTypeFamily DECIMAL
public static final SqlTypeFamily INTEGER
public static final SqlTypeFamily DATETIME
public static final SqlTypeFamily DATETIME_INTERVAL
public static final SqlTypeFamily MULTISET
public static final SqlTypeFamily ARRAY
public static final SqlTypeFamily MAP
public static final SqlTypeFamily NULL
public static final SqlTypeFamily ANY
public static final SqlTypeFamily CURSOR
public static final SqlTypeFamily COLUMN_LIST
public static final SqlTypeFamily GEO
public static final SqlTypeFamily IGNORE
public static SqlTypeFamily[] values()
for (SqlTypeFamily c : SqlTypeFamily.values()) System.out.println(c);
public static SqlTypeFamily valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static @Nullable SqlTypeFamily getFamilyForJdbcType(int jdbcType)
jdbcType - the JDBC type of interestpublic List<SqlTypeFamily> allowableDifferenceTypes()
Equivalently, given an ORDER BY expression with one key,
returns the allowable type families of the difference between two keys.
Example 1. For ORDER BY empno, a NUMERIC, the difference
between two empno values is also NUMERIC.
Example 2. For ORDER BY hireDate, a DATE, the difference
between two hireDate values might be an INTERVAL_DAY_TIME
or INTERVAL_YEAR_MONTH.
The result determines whether a SqlWindow with a RANGE
is valid (for example, OVER (ORDER BY empno RANGE 10 is valid
because 10 is numeric);
and whether a call to
PERCENTILE_CONT
is valid (for example, PERCENTILE_CONT(0.25) ORDER BY (hireDate)}
is valid because hireDate values may be interpolated by adding
values of type INTERVAL_DAY_TIME.
public Collection<SqlTypeName> getTypeNames()
SqlTypeNames included in this family.public @Nullable RelDataType getDefaultConcreteType(RelDataTypeFactory factory)
RelDataType that belongs to this family.public boolean contains(RelDataType type)
Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.