Package org.apache.calcite.sql
Enum SqlNullSemantics
- All Implemented Interfaces:
Serializable
,Comparable<SqlNullSemantics>
,Constable
SqlNullSemantics defines the possible comparison rules for values which might
be null. In SQL (and internal plans used to process SQL) different rules are
used depending on the context.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionWildcard semantics: logically, this is not present in any SQL construct.Predicate semantics: e.g.GROUP BY key semantics: e.g. -
Method Summary
Modifier and TypeMethodDescriptionstatic SqlNullSemantics
Returns the enum constant of this type with the specified name.static SqlNullSemantics[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NULL_MATCHES_NOTHING
Predicate semantics: e.g. in the expression (WHERE X=5), if X is NULL, the comparison result is unknown, and so a filter used to evaluate the WHERE clause rejects the row. -
NULL_MATCHES_NULL
GROUP BY key semantics: e.g. in the expression (GROUP BY A,B), the key (null,5) is treated as equal to another key (null,5). -
NULL_MATCHES_ANYTHING
Wildcard semantics: logically, this is not present in any SQL construct. However, it is required internally, for example to rewrite NOT IN to NOT EXISTS; when we negate a predicate, we invert the null semantics, so NULL_MATCHES_NOTHING must become NULL_MATCHES_ANYTHING.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-