@Internal public final class TypeStrategies extends Object
TypeStrategy| Modifier and Type | Field and Description |
|---|---|
static TypeStrategy |
ARRAY
Type strategy that returns a
DataTypes.ARRAY(DataType) with element type equal to the type of
the first argument. |
static TypeStrategy |
COMMON |
static TypeStrategy |
DECIMAL_DIVIDE
Type strategy that returns the quotient of an exact numeric division that includes at least
one decimal.
|
static TypeStrategy |
DECIMAL_MOD
Type strategy that returns the modulo of an exact numeric division that includes at least
one decimal.
|
static TypeStrategy |
DECIMAL_PLUS
<<<<<<< HEAD
Type strategy that returns the sum of an exact numeric addition that includes at least one decimal.
|
static TypeStrategy |
DECIMAL_SCALE0
Strategy that returns a decimal type but with a scale of 0.
|
static TypeStrategy |
DECIMAL_TIMES
Type strategy that returns the product of an exact numeric multiplication that includes at least
one decimal.
|
static TypeStrategy |
GET
Type strategy that returns a type of a field nested inside a composite type that is described by the second argument.
|
static TypeStrategy |
MAP
Type strategy that returns a
DataTypes.MAP(DataType, DataType) with a key type equal to type
of the first argument and a value type equal to the type of second argument. |
static TypeStrategy |
MISSING
Placeholder for a missing type strategy.
|
static TypeStrategy |
ROUND
Type strategy that returns the result of a rounding operation.
|
static TypeStrategy |
ROW
Type strategy that returns a
DataTypes.ROW() with fields types equal to input types. |
static TypeStrategy |
STRING_CONCAT
Type strategy that returns the type of a string concatenation.
|
| Modifier and Type | Method and Description |
|---|---|
static TypeStrategy |
argument(int pos)
Type strategy that returns the n-th input argument.
|
static TypeStrategy |
explicit(DataType dataType)
Type strategy that returns a fixed
DataType. |
static TypeStrategy |
first(TypeStrategy... strategies)
Type strategy that returns the first type that could be inferred.
|
static TypeStrategy |
mapping(Map<InputTypeStrategy,TypeStrategy> mappings)
Type strategy that maps an
InputTypeStrategy to a TypeStrategy if the input strategy
infers identical types. |
static TypeStrategy |
matchFamily(int argumentPos,
LogicalTypeFamily family)
Type strategy that returns the given argument if it is of the same logical type family.
|
static TypeStrategy |
nullable(ConstantArgumentCount includedArgs,
TypeStrategy initialStrategy)
A type strategy that can be used to make a result type nullable if any of the selected
input arguments is nullable.
|
static TypeStrategy |
nullable(TypeStrategy initialStrategy)
A type strategy that can be used to make a result type nullable if any of the
input arguments is nullable.
|
static TypeStrategy |
varyingString(TypeStrategy initialStrategy)
A type strategy that ensures that the result type is either
LogicalTypeRoot.VARCHAR or
LogicalTypeRoot.VARBINARY from their corresponding non-varying roots. |
public static final TypeStrategy MISSING
public static final TypeStrategy COMMON
public static final TypeStrategy ROW
DataTypes.ROW() with fields types equal to input types.public static final TypeStrategy MAP
DataTypes.MAP(DataType, DataType) with a key type equal to type
of the first argument and a value type equal to the type of second argument.public static final TypeStrategy ARRAY
DataTypes.ARRAY(DataType) with element type equal to the type of
the first argument.public static final TypeStrategy DECIMAL_PLUS
public static final TypeStrategy DECIMAL_DIVIDE
public static final TypeStrategy DECIMAL_TIMES
public static final TypeStrategy DECIMAL_MOD
public static final TypeStrategy DECIMAL_SCALE0
public static final TypeStrategy ROUND
public static final TypeStrategy STRING_CONCAT
LogicalTypeFamily.BINARY_STRING or
LogicalTypeFamily.CHARACTER_STRING.public static final TypeStrategy GET
public static TypeStrategy explicit(DataType dataType)
DataType.public static TypeStrategy argument(int pos)
public static TypeStrategy first(TypeStrategy... strategies)
public static TypeStrategy matchFamily(int argumentPos, LogicalTypeFamily family)
public static TypeStrategy mapping(Map<InputTypeStrategy,TypeStrategy> mappings)
InputTypeStrategy to a TypeStrategy if the input strategy
infers identical types.public static TypeStrategy nullable(ConstantArgumentCount includedArgs, TypeStrategy initialStrategy)
public static TypeStrategy nullable(TypeStrategy initialStrategy)
public static TypeStrategy varyingString(TypeStrategy initialStrategy)
LogicalTypeRoot.VARCHAR or
LogicalTypeRoot.VARBINARY from their corresponding non-varying roots.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.