OmniSciDB  c07336695a
com.mapd.calcite.parser.MapDSqlOperatorTable.Datepart Class Reference
+ Inheritance diagram for com.mapd.calcite.parser.MapDSqlOperatorTable.Datepart:
+ Collaboration diagram for com.mapd.calcite.parser.MapDSqlOperatorTable.Datepart:

Public Member Functions

 Datepart ()
 
RelDataType inferReturnType (SqlOperatorBinding opBinding)
 

Detailed Description

Definition at line 421 of file MapDSqlOperatorTable.java.

Constructor & Destructor Documentation

◆ Datepart()

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

Definition at line 422 of file MapDSqlOperatorTable.java.

422  {
423  super("DATEPART",
424  SqlKind.OTHER_FUNCTION,
425  null,
426  null,
427  OperandTypes.family(SqlTypeFamily.STRING, SqlTypeFamily.DATETIME),
428  SqlFunctionCategory.TIMEDATE);
429  }

Member Function Documentation

◆ inferReturnType()

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

Definition at line 432 of file MapDSqlOperatorTable.java.

432  {
433  final RelDataTypeFactory typeFactory = opBinding.getTypeFactory();
434  return typeFactory.createTypeWithNullability(
435  typeFactory.createSqlType(SqlTypeName.BIGINT),
436  opBinding.getOperandType(1).isNullable());
437  }

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