Java Code Examples for org.apache.calcite.sql.type.SqlTypeName#INTERVAL_DAY_MINUTE
The following examples show how to use
org.apache.calcite.sql.type.SqlTypeName#INTERVAL_DAY_MINUTE .
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: SqlIntervalQualifier.java From Bats with Apache License 2.0 | 4 votes |
public SqlTypeName typeName() { switch (timeUnitRange) { case YEAR: case ISOYEAR: case CENTURY: case DECADE: case MILLENNIUM: return SqlTypeName.INTERVAL_YEAR; case YEAR_TO_MONTH: return SqlTypeName.INTERVAL_YEAR_MONTH; case MONTH: case QUARTER: return SqlTypeName.INTERVAL_MONTH; case DOW: case ISODOW: case DOY: case DAY: case WEEK: return SqlTypeName.INTERVAL_DAY; case DAY_TO_HOUR: return SqlTypeName.INTERVAL_DAY_HOUR; case DAY_TO_MINUTE: return SqlTypeName.INTERVAL_DAY_MINUTE; case DAY_TO_SECOND: return SqlTypeName.INTERVAL_DAY_SECOND; case HOUR: return SqlTypeName.INTERVAL_HOUR; case HOUR_TO_MINUTE: return SqlTypeName.INTERVAL_HOUR_MINUTE; case HOUR_TO_SECOND: return SqlTypeName.INTERVAL_HOUR_SECOND; case MINUTE: return SqlTypeName.INTERVAL_MINUTE; case MINUTE_TO_SECOND: return SqlTypeName.INTERVAL_MINUTE_SECOND; case SECOND: case MILLISECOND: case EPOCH: case MICROSECOND: case NANOSECOND: return SqlTypeName.INTERVAL_SECOND; default: throw new AssertionError(timeUnitRange); } }
Example 2
Source File: SqlIntervalQualifier.java From calcite with Apache License 2.0 | 4 votes |
public SqlTypeName typeName() { switch (timeUnitRange) { case YEAR: case ISOYEAR: case CENTURY: case DECADE: case MILLENNIUM: return SqlTypeName.INTERVAL_YEAR; case YEAR_TO_MONTH: return SqlTypeName.INTERVAL_YEAR_MONTH; case MONTH: case QUARTER: return SqlTypeName.INTERVAL_MONTH; case DOW: case ISODOW: case DOY: case DAY: case WEEK: return SqlTypeName.INTERVAL_DAY; case DAY_TO_HOUR: return SqlTypeName.INTERVAL_DAY_HOUR; case DAY_TO_MINUTE: return SqlTypeName.INTERVAL_DAY_MINUTE; case DAY_TO_SECOND: return SqlTypeName.INTERVAL_DAY_SECOND; case HOUR: return SqlTypeName.INTERVAL_HOUR; case HOUR_TO_MINUTE: return SqlTypeName.INTERVAL_HOUR_MINUTE; case HOUR_TO_SECOND: return SqlTypeName.INTERVAL_HOUR_SECOND; case MINUTE: return SqlTypeName.INTERVAL_MINUTE; case MINUTE_TO_SECOND: return SqlTypeName.INTERVAL_MINUTE_SECOND; case SECOND: case MILLISECOND: case EPOCH: case MICROSECOND: case NANOSECOND: return SqlTypeName.INTERVAL_SECOND; default: throw new AssertionError(timeUnitRange); } }