OmniSciDB  85c2d10cdc
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 518 of file MapDSqlOperatorTable.java.

Constructor & Destructor Documentation

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

Definition at line 519 of file MapDSqlOperatorTable.java.

519  {
520  super("DATEDIFF",
521  SqlKind.OTHER_FUNCTION,
522  null,
523  null,
524  OperandTypes.family(SqlTypeFamily.STRING,
525  SqlTypeFamily.DATETIME,
526  SqlTypeFamily.DATETIME),
527  SqlFunctionCategory.TIMEDATE);
528  }

Member Function Documentation

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

Definition at line 531 of file MapDSqlOperatorTable.java.

References BIGINT.

531  {
532  final RelDataTypeFactory typeFactory = opBinding.getTypeFactory();
533  return typeFactory.createTypeWithNullability(
534  typeFactory.createSqlType(SqlTypeName.BIGINT),
535  opBinding.getOperandType(1).isNullable()
536  || opBinding.getOperandType(2).isNullable());
537  }
#define BIGINT

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