OmniSciDB  baf940c279
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 594 of file MapDSqlOperatorTable.java.

Constructor & Destructor Documentation

◆ Datepart()

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

Definition at line 595 of file MapDSqlOperatorTable.java.

595  {
596  super("DATEPART",
597  SqlKind.OTHER_FUNCTION,
598  null,
599  null,
600  OperandTypes.family(SqlTypeFamily.STRING, SqlTypeFamily.DATETIME),
601  SqlFunctionCategory.TIMEDATE);
602  }

Member Function Documentation

◆ inferReturnType()

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

Definition at line 605 of file MapDSqlOperatorTable.java.

605  {
606  final RelDataTypeFactory typeFactory = opBinding.getTypeFactory();
607  return typeFactory.createTypeWithNullability(
608  typeFactory.createSqlType(SqlTypeName.BIGINT),
609  opBinding.getOperandType(1).isNullable());
610  }

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