Java Code Examples for org.apache.calcite.sql.SqlFunctionCategory#TIMEDATE

The following examples show how to use org.apache.calcite.sql.SqlFunctionCategory#TIMEDATE . 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: SqlCurrentDateFunction.java    From Bats with Apache License 2.0 5 votes vote down vote up
public SqlCurrentDateFunction() {
  super(
      "CURRENT_DATE",
      SqlKind.OTHER_FUNCTION,
      ReturnTypes.DATE,
      null,
      OperandTypes.NILADIC,
      SqlFunctionCategory.TIMEDATE);
}
 
Example 2
Source File: SqlDatePartFunction.java    From Bats with Apache License 2.0 5 votes vote down vote up
public SqlDatePartFunction(String name, TimeUnit timeUnit) {
  super(name,
      SqlKind.OTHER,
      ReturnTypes.BIGINT_NULLABLE,
      InferTypes.FIRST_KNOWN,
      OperandTypes.DATETIME,
      SqlFunctionCategory.TIMEDATE);
  this.timeUnit = timeUnit;
}
 
Example 3
Source File: SqlTimestampAddFunction.java    From Bats with Apache License 2.0 5 votes vote down vote up
/** Creates a SqlTimestampAddFunction. */
SqlTimestampAddFunction() {
  super("TIMESTAMPADD", SqlKind.TIMESTAMP_ADD, RETURN_TYPE_INFERENCE, null,
      OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.INTEGER,
          SqlTypeFamily.DATETIME),
      SqlFunctionCategory.TIMEDATE);
}
 
Example 4
Source File: SqlTimestampDiffFunction.java    From Bats with Apache License 2.0 5 votes vote down vote up
SqlTimestampDiffFunction() {
  super("TIMESTAMPDIFF", SqlKind.TIMESTAMP_DIFF,
      RETURN_TYPE_INFERENCE, null,
      OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.DATETIME,
          SqlTypeFamily.DATETIME),
      SqlFunctionCategory.TIMEDATE);
}
 
Example 5
Source File: SqlCurrentDateFunction.java    From calcite with Apache License 2.0 5 votes vote down vote up
public SqlCurrentDateFunction() {
  super(
      "CURRENT_DATE",
      SqlKind.OTHER_FUNCTION,
      ReturnTypes.DATE,
      null,
      OperandTypes.NILADIC,
      SqlFunctionCategory.TIMEDATE);
}
 
Example 6
Source File: SqlDatePartFunction.java    From calcite with Apache License 2.0 5 votes vote down vote up
public SqlDatePartFunction(String name, TimeUnit timeUnit) {
  super(name,
      SqlKind.OTHER,
      ReturnTypes.BIGINT_NULLABLE,
      InferTypes.FIRST_KNOWN,
      OperandTypes.DATETIME,
      SqlFunctionCategory.TIMEDATE);
  this.timeUnit = timeUnit;
}
 
Example 7
Source File: SqlTimestampAddFunction.java    From calcite with Apache License 2.0 5 votes vote down vote up
/** Creates a SqlTimestampAddFunction. */
SqlTimestampAddFunction() {
  super("TIMESTAMPADD", SqlKind.TIMESTAMP_ADD, RETURN_TYPE_INFERENCE, null,
      OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.INTEGER,
          SqlTypeFamily.DATETIME),
      SqlFunctionCategory.TIMEDATE);
}
 
Example 8
Source File: SqlTimestampDiffFunction.java    From calcite with Apache License 2.0 5 votes vote down vote up
SqlTimestampDiffFunction() {
  super("TIMESTAMPDIFF", SqlKind.TIMESTAMP_DIFF,
      RETURN_TYPE_INFERENCE, null,
      OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.DATETIME,
          SqlTypeFamily.DATETIME),
      SqlFunctionCategory.TIMEDATE);
}
 
Example 9
Source File: SqlAbstractTimeFunction.java    From Bats with Apache License 2.0 4 votes vote down vote up
protected SqlAbstractTimeFunction(String name, SqlTypeName typeName) {
  super(name, SqlKind.OTHER_FUNCTION, null, null, OTC_CUSTOM,
      SqlFunctionCategory.TIMEDATE);
  this.typeName = typeName;
}
 
Example 10
Source File: SqlAbstractTimeFunction.java    From calcite with Apache License 2.0 4 votes vote down vote up
protected SqlAbstractTimeFunction(String name, SqlTypeName typeName) {
  super(name, SqlKind.OTHER_FUNCTION, null, null, OTC_CUSTOM,
      SqlFunctionCategory.TIMEDATE);
  this.typeName = typeName;
}