OmniSciDB  f632821e96
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 532 of file MapDSqlOperatorTable.java.

Constructor & Destructor Documentation

◆ Datediff()

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

Definition at line 533 of file MapDSqlOperatorTable.java.

533  {
534  super("DATEDIFF",
535  SqlKind.OTHER_FUNCTION,
536  null,
537  null,
538  OperandTypes.family(SqlTypeFamily.STRING,
539  SqlTypeFamily.DATETIME,
540  SqlTypeFamily.DATETIME),
541  SqlFunctionCategory.TIMEDATE);
542  }

Member Function Documentation

◆ inferReturnType()

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

Definition at line 545 of file MapDSqlOperatorTable.java.

545  {
546  final RelDataTypeFactory typeFactory = opBinding.getTypeFactory();
547  return typeFactory.createTypeWithNullability(
548  typeFactory.createSqlType(SqlTypeName.BIGINT),
549  opBinding.getOperandType(1).isNullable()
550  || opBinding.getOperandType(2).isNullable());
551  }

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