public class SqlTimestampAddFunction
extends org.apache.calcite.sql.SqlFunction
TIMESTAMPADD
function, which adds an interval to a datetime (TIMESTAMP, TIME or
DATE).
The SQL syntax is
TIMESTAMPADD(timestamp interval, quantity,
datetime)
The interval time unit can one of the following literals:
Returns modified datetime.
This class was copied over from Calcite to fix the return type deduction issue on timestamp with local time zone type (CALCITE-4698).
Modifier and Type | Method and Description |
---|---|
static org.apache.calcite.rel.type.RelDataType |
deduceType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory,
org.apache.calcite.avatica.util.TimeUnit timeUnit,
org.apache.calcite.rel.type.RelDataType intervalType,
org.apache.calcite.rel.type.RelDataType datetimeType) |
deriveType, getFunctionType, getNameAsId, getParamNames, getParamTypes, getSqlIdentifier, getSyntax, isQuantifierAllowed, unparse, validateCall, validateQuantifier
acceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, createCall, createCall, createCall, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getMonotonicity, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, getStrongPolicyInference, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, isSymmetrical, leftPrec, not, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, reverse, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands, validRexOperands
public static org.apache.calcite.rel.type.RelDataType deduceType(org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, org.apache.calcite.avatica.util.TimeUnit timeUnit, org.apache.calcite.rel.type.RelDataType intervalType, org.apache.calcite.rel.type.RelDataType datetimeType)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.