public abstract class RelDataTypeSystemImpl extends java.lang.Object implements RelDataTypeSystem
RelDataTypeSystem
,
providing parameters from the SQL standard.
To implement other type systems, create a derived class and override values as needed.
Parameter | Value |
---|---|
MAX_NUMERIC_SCALE | 19 |
DEFAULT
Constructor and Description |
---|
RelDataTypeSystemImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
allowExtendedTrim() |
RelDataType |
deriveAvgAggType(RelDataTypeFactory typeFactory,
RelDataType argumentType)
Returns the return type of a call to the
AVG , STDDEV or
VAR aggregate functions, inferred from its argument type. |
RelDataType |
deriveCovarType(RelDataTypeFactory typeFactory,
RelDataType arg0Type,
RelDataType arg1Type)
Returns the return type of a call to the
COVAR aggregate function,
inferred from its argument types. |
RelDataType |
deriveFractionalRankType(RelDataTypeFactory typeFactory)
Returns the return type of the
CUME_DIST and PERCENT_RANK
aggregate functions. |
RelDataType |
deriveRankType(RelDataTypeFactory typeFactory)
Returns the return type of the
NTILE , RANK ,
DENSE_RANK , and ROW_NUMBER aggregate functions. |
RelDataType |
deriveSumType(RelDataTypeFactory typeFactory,
RelDataType argumentType)
Returns the return type of a call to the
SUM aggregate function,
inferred from its argument type. |
int |
getDefaultPrecision(SqlTypeName typeName)
Returns default precision for this type if supported, otherwise -1 if
precision is either unsupported or must be specified explicitly.
|
java.lang.String |
getLiteral(SqlTypeName typeName,
boolean isPrefix)
Returns the LITERAL string for the type, either PREFIX/SUFFIX.
|
int |
getMaxNumericPrecision()
Returns the maximum precision of a NUMERIC or DECIMAL type.
|
int |
getMaxNumericScale()
Returns the maximum scale of a NUMERIC or DECIMAL type.
|
int |
getMaxPrecision(SqlTypeName typeName)
Returns the maximum precision (or length) allowed for this type, or -1 if
precision/length are not applicable for this type.
|
int |
getMaxScale(SqlTypeName typeName)
Returns the maximum scale of a given type.
|
int |
getNumTypeRadix(SqlTypeName typeName)
Returns the numeric type radix, typically 2 or 10.
|
boolean |
isAutoincrement(SqlTypeName typeName)
Returns whether the type can be auto increment.
|
boolean |
isCaseSensitive(SqlTypeName typeName)
Returns whether the type is case sensitive.
|
boolean |
isSchemaCaseSensitive()
Whether two record types are considered distinct if their field names
are the same but in different cases.
|
boolean |
shouldConvertRaggedUnionTypesToVarying()
Whether the least restrictive type of a number of CHAR types of different
lengths should be a VARCHAR type.
|
public int getMaxScale(SqlTypeName typeName)
RelDataTypeSystem
getMaxScale
in interface RelDataTypeSystem
public int getDefaultPrecision(SqlTypeName typeName)
RelDataTypeSystem
getDefaultPrecision
in interface RelDataTypeSystem
public int getMaxPrecision(SqlTypeName typeName)
RelDataTypeSystem
getMaxPrecision
in interface RelDataTypeSystem
public int getMaxNumericScale()
RelDataTypeSystem
getMaxNumericScale
in interface RelDataTypeSystem
public int getMaxNumericPrecision()
RelDataTypeSystem
getMaxNumericPrecision
in interface RelDataTypeSystem
public java.lang.String getLiteral(SqlTypeName typeName, boolean isPrefix)
RelDataTypeSystem
getLiteral
in interface RelDataTypeSystem
public boolean isCaseSensitive(SqlTypeName typeName)
RelDataTypeSystem
isCaseSensitive
in interface RelDataTypeSystem
public boolean isAutoincrement(SqlTypeName typeName)
RelDataTypeSystem
isAutoincrement
in interface RelDataTypeSystem
public int getNumTypeRadix(SqlTypeName typeName)
RelDataTypeSystem
getNumTypeRadix
in interface RelDataTypeSystem
public RelDataType deriveSumType(RelDataTypeFactory typeFactory, RelDataType argumentType)
RelDataTypeSystem
SUM
aggregate function,
inferred from its argument type.deriveSumType
in interface RelDataTypeSystem
public RelDataType deriveAvgAggType(RelDataTypeFactory typeFactory, RelDataType argumentType)
RelDataTypeSystem
AVG
, STDDEV
or
VAR
aggregate functions, inferred from its argument type.deriveAvgAggType
in interface RelDataTypeSystem
public RelDataType deriveCovarType(RelDataTypeFactory typeFactory, RelDataType arg0Type, RelDataType arg1Type)
RelDataTypeSystem
COVAR
aggregate function,
inferred from its argument types.deriveCovarType
in interface RelDataTypeSystem
public RelDataType deriveFractionalRankType(RelDataTypeFactory typeFactory)
RelDataTypeSystem
CUME_DIST
and PERCENT_RANK
aggregate functions.deriveFractionalRankType
in interface RelDataTypeSystem
public RelDataType deriveRankType(RelDataTypeFactory typeFactory)
RelDataTypeSystem
NTILE
, RANK
,
DENSE_RANK
, and ROW_NUMBER
aggregate functions.deriveRankType
in interface RelDataTypeSystem
public boolean isSchemaCaseSensitive()
RelDataTypeSystem
isSchemaCaseSensitive
in interface RelDataTypeSystem
public boolean shouldConvertRaggedUnionTypesToVarying()
RelDataTypeSystem
shouldConvertRaggedUnionTypesToVarying
in interface RelDataTypeSystem
public boolean allowExtendedTrim()
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.