Java Code Examples for org.apache.calcite.sql.type.OperandTypes#sequence()
The following examples show how to use
org.apache.calcite.sql.type.OperandTypes#sequence() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SqlDatePartOperator.java From dremio-oss with Apache License 2.0 | 6 votes |
public SqlDatePartOperator() { super( "DATE_PART", SqlKind.OTHER_FUNCTION, ReturnTypes.BIGINT_NULLABLE, null, OperandTypes.sequence( "<PERIOD LITERAL>, <DATE or TIMESTAMP or INTERVAL>", new EnumeratedListChecker(VALID_PERIODS.keySet()), OperandTypes.or( OperandTypes.family(SqlTypeFamily.DATE), OperandTypes.family(SqlTypeFamily.TIMESTAMP), OperandTypes.family(SqlTypeFamily.DATETIME), OperandTypes.family(SqlTypeFamily.DATETIME_INTERVAL), OperandTypes.family(SqlTypeFamily.INTERVAL_DAY_TIME), OperandTypes.family(SqlTypeFamily.INTERVAL_YEAR_MONTH)) ), SqlFunctionCategory.SYSTEM); }
Example 2
Source File: SqlOverlapsOperator.java From Bats with Apache License 2.0 | 4 votes |
SqlOverlapsOperator(SqlKind kind) { super(kind.sql, kind, 30, true, ReturnTypes.BOOLEAN_NULLABLE, InferTypes.FIRST_KNOWN, OperandTypes.sequence("'<PERIOD> " + kind.sql + " <PERIOD>'", OperandTypes.PERIOD, OperandTypes.PERIOD)); }
Example 3
Source File: SqlOverlapsOperator.java From calcite with Apache License 2.0 | 4 votes |
SqlOverlapsOperator(SqlKind kind) { super(kind.sql, kind, 30, true, ReturnTypes.BOOLEAN_NULLABLE, InferTypes.FIRST_KNOWN, OperandTypes.sequence("'<PERIOD> " + kind.sql + " <PERIOD>'", OperandTypes.PERIOD, OperandTypes.PERIOD)); }