OmniSciDB  bf83d84833
 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 712 of file MapDSqlOperatorTable.java.

Constructor & Destructor Documentation

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

Definition at line 713 of file MapDSqlOperatorTable.java.

713  {
714  super("DATEPART",
715  SqlKind.OTHER_FUNCTION,
716  null,
717  null,
718  OperandTypes.family(SqlTypeFamily.STRING, SqlTypeFamily.DATETIME),
719  SqlFunctionCategory.TIMEDATE);
720  }

Member Function Documentation

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

Definition at line 723 of file MapDSqlOperatorTable.java.

723  {
724  final RelDataTypeFactory typeFactory = opBinding.getTypeFactory();
725  return typeFactory.createTypeWithNullability(
726  typeFactory.createSqlType(SqlTypeName.BIGINT),
727  opBinding.getOperandType(1).isNullable());
728  }

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