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

Constructor & Destructor Documentation

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

Definition at line 454 of file MapDSqlOperatorTable.java.

454  {
455  super("DATEPART",
456  SqlKind.OTHER_FUNCTION,
457  null,
458  null,
459  OperandTypes.family(SqlTypeFamily.STRING, SqlTypeFamily.DATETIME),
460  SqlFunctionCategory.TIMEDATE);
461  }

Member Function Documentation

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

Definition at line 464 of file MapDSqlOperatorTable.java.

464  {
465  final RelDataTypeFactory typeFactory = opBinding.getTypeFactory();
466  return typeFactory.createTypeWithNullability(
467  typeFactory.createSqlType(SqlTypeName.BIGINT),
468  opBinding.getOperandType(1).isNullable());
469  }

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