Package org.apache.calcite.sql.fun
Class SqlOverlapsOperator
- java.lang.Object
-
- org.apache.calcite.sql.SqlOperator
-
- org.apache.calcite.sql.SqlBinaryOperator
-
- org.apache.calcite.sql.fun.SqlOverlapsOperator
-
public class SqlOverlapsOperator extends SqlBinaryOperator
SqlOverlapsOperator represents the SQL:1999 standardOVERLAPS
function. Determines whether two anchored time intervals overlap.
-
-
Field Summary
-
Fields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL
-
-
Constructor Summary
Constructors Constructor Description SqlOverlapsOperator(SqlKind kind)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
arg(SqlWriter writer, SqlCall call, int leftPrec, int rightPrec, int i)
boolean
checkOperandTypes(SqlCallBinding callBinding, boolean throwOnFailure)
Checks that the operand values in aSqlCall
to this operator are valid.java.lang.String
getAllowedSignatures(java.lang.String opName)
Returns a string describing the expected operand types of a call, e.g.SqlOperandCountRange
getOperandCountRange()
Returns a constraint on the number of operands expected by this operator.void
unparse(SqlWriter writer, SqlCall call, int leftPrec, int rightPrec)
Writes a SQL representation of a call to this operator to a writer, including parentheses if the operators on either side are of greater precedence.-
Methods inherited from class org.apache.calcite.sql.SqlBinaryOperator
adjustType, deriveType, getMonotonicity, getSignatureTemplate, getSyntax, validRexOperands
-
Methods inherited from class org.apache.calcite.sql.SqlOperator
acceptCall, acceptCall, allowsFraming, argumentMustBeScalar, checkOperandCount, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, equals, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getName, getNameAsId, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, leftPrec, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateCall, validateOperands
-
-
-
-
Constructor Detail
-
SqlOverlapsOperator
SqlOverlapsOperator(SqlKind kind)
-
-
Method Detail
-
unparse
public void unparse(SqlWriter writer, SqlCall call, int leftPrec, int rightPrec)
Description copied from class:SqlOperator
Writes a SQL representation of a call to this operator to a writer, including parentheses if the operators on either side are of greater precedence.The default implementation of this method delegates to
SqlSyntax.unparse(org.apache.calcite.sql.SqlWriter, org.apache.calcite.sql.SqlOperator, org.apache.calcite.sql.SqlCall, int, int)
.- Overrides:
unparse
in classSqlOperator
-
getOperandCountRange
public SqlOperandCountRange getOperandCountRange()
Description copied from class:SqlOperator
Returns a constraint on the number of operands expected by this operator. Subclasses may override this method; when they don't, the range is derived from theSqlOperandTypeChecker
associated with this operator.- Overrides:
getOperandCountRange
in classSqlOperator
- Returns:
- acceptable range
-
getAllowedSignatures
public java.lang.String getAllowedSignatures(java.lang.String opName)
Description copied from class:SqlOperator
Returns a string describing the expected operand types of a call, e.g. "SUBSTRING(VARCHAR, INTEGER, INTEGER)" where the name (SUBSTRING in this example) can be replaced by a specified name.- Overrides:
getAllowedSignatures
in classSqlOperator
-
checkOperandTypes
public boolean checkOperandTypes(SqlCallBinding callBinding, boolean throwOnFailure)
Description copied from class:SqlOperator
Checks that the operand values in aSqlCall
to this operator are valid. Subclasses must either override this method or supply an instance ofSqlOperandTypeChecker
to the constructor.- Overrides:
checkOperandTypes
in classSqlOperator
- Parameters:
callBinding
- description of callthrowOnFailure
- whether to throw an exception if check fails (otherwise returns false in that case)- Returns:
- whether check succeeded
-
-