public class IntervalSqlType extends AbstractSqlType
Modifier and Type | Field and Description |
---|---|
private SqlIntervalQualifier |
intervalQualifier |
private RelDataTypeSystem |
typeSystem |
isNullable, typeName
digest, fieldList
PRECISION_NOT_SPECIFIED, SCALE_NOT_SPECIFIED
Constructor and Description |
---|
IntervalSqlType(RelDataTypeSystem typeSystem,
SqlIntervalQualifier intervalQualifier,
boolean isNullable)
Constructs an IntervalSqlType.
|
Modifier and Type | Method and Description |
---|---|
IntervalSqlType |
combine(RelDataTypeFactoryImpl typeFactory,
IntervalSqlType that)
Combines two IntervalTypes and returns the result.
|
protected void |
generateTypeString(java.lang.StringBuilder sb,
boolean withDetail)
Generates a string representation of this type.
|
SqlIntervalQualifier |
getIntervalQualifier()
Gets this type's interval qualifier, or null if this is not an interval
type.
|
int |
getPrecision()
Gets the JDBC-defined precision for values of this type.
|
int |
getScale()
Gets the scale of this type.
|
getFamily, getPrecedenceList, getSqlTypeName, isNullable
computeDigest, equals, extra, getCharset, getCollation, getComparability, getComponentType, getField, getFieldCount, getFieldList, getFieldNames, getFullTypeString, getKeyType, getSqlIdentifier, getStructKind, getValueType, hashCode, isDynamicStruct, isStruct, proto, proto, proto, proto, toString
private final RelDataTypeSystem typeSystem
private final SqlIntervalQualifier intervalQualifier
public IntervalSqlType(RelDataTypeSystem typeSystem, SqlIntervalQualifier intervalQualifier, boolean isNullable)
protected void generateTypeString(java.lang.StringBuilder sb, boolean withDetail)
RelDataTypeImpl
generateTypeString
in class RelDataTypeImpl
sb
- StringBuilder into which to generate the stringwithDetail
- when true, all detail information needed to compute a
unique digest (and return from getFullTypeString) should
be included;public SqlIntervalQualifier getIntervalQualifier()
RelDataType
getIntervalQualifier
in interface RelDataType
getIntervalQualifier
in class RelDataTypeImpl
public IntervalSqlType combine(RelDataTypeFactoryImpl typeFactory, IntervalSqlType that)
INTERVAL DAY TO HOUR
INTERVAL SECOND
isINTERVAL DAY TO SECOND
public int getPrecision()
RelDataType
Returns RelDataType.PRECISION_NOT_SPECIFIED
(-1) if precision is not
applicable for this type.
getPrecision
in interface RelDataType
getPrecision
in class RelDataTypeImpl
public int getScale()
RelDataType
RelDataType.SCALE_NOT_SPECIFIED
(-1) if
scale is not valid for this type.getScale
in interface RelDataType
getScale
in class RelDataTypeImpl
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.