OmniSciDB  04ee39c94c
com.mapd.calcite.parser.MapDSqlOperatorTable.Datediff Class Reference
+ Inheritance diagram for com.mapd.calcite.parser.MapDSqlOperatorTable.Datediff:
+ Collaboration diagram for com.mapd.calcite.parser.MapDSqlOperatorTable.Datediff:

Public Member Functions

 Datediff ()
 
RelDataType inferReturnType (SqlOperatorBinding opBinding)
 

Detailed Description

Definition at line 462 of file MapDSqlOperatorTable.java.

Constructor & Destructor Documentation

◆ Datediff()

com.mapd.calcite.parser.MapDSqlOperatorTable.Datediff.Datediff ( )
inline

Definition at line 463 of file MapDSqlOperatorTable.java.

463  {
464  super("DATEDIFF",
465  SqlKind.OTHER_FUNCTION,
466  null,
467  null,
468  OperandTypes.family(SqlTypeFamily.STRING,
469  SqlTypeFamily.DATETIME,
470  SqlTypeFamily.DATETIME),
471  SqlFunctionCategory.TIMEDATE);
472  }

Member Function Documentation

◆ inferReturnType()

RelDataType com.mapd.calcite.parser.MapDSqlOperatorTable.Datediff.inferReturnType ( SqlOperatorBinding  opBinding)
inline

Definition at line 475 of file MapDSqlOperatorTable.java.

475  {
476  final RelDataTypeFactory typeFactory = opBinding.getTypeFactory();
477  return typeFactory.createTypeWithNullability(
478  typeFactory.createSqlType(SqlTypeName.BIGINT),
479  opBinding.getOperandType(1).isNullable()
480  || opBinding.getOperandType(2).isNullable());
481  }

The documentation for this class was generated from the following file: