OmniSciDB  85c2d10cdc
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
com.mapd.calcite.parser.MapDSqlOperatorTable.PgDateTrunc Class Reference
+ Inheritance diagram for com.mapd.calcite.parser.MapDSqlOperatorTable.PgDateTrunc:
+ Collaboration diagram for com.mapd.calcite.parser.MapDSqlOperatorTable.PgDateTrunc:

Public Member Functions

 PgDateTrunc ()
 
RelDataType inferReturnType (SqlOperatorBinding opBinding)
 

Detailed Description

Definition at line 541 of file MapDSqlOperatorTable.java.

Constructor & Destructor Documentation

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

Definition at line 542 of file MapDSqlOperatorTable.java.

542  {
543  super("PG_DATE_TRUNC",
544  SqlKind.OTHER_FUNCTION,
545  null,
546  null,
547  OperandTypes.family(SqlTypeFamily.STRING, SqlTypeFamily.DATETIME),
548  SqlFunctionCategory.SYSTEM);
549  }

Member Function Documentation

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

Definition at line 552 of file MapDSqlOperatorTable.java.

References TIMESTAMP.

552  {
553  final RelDataTypeFactory typeFactory = opBinding.getTypeFactory();
554  return typeFactory.createTypeWithNullability(
555  typeFactory.createSqlType(
556  SqlTypeName.TIMESTAMP, opBinding.getOperandType(1).getPrecision()),
557  opBinding.getOperandType(1).isNullable());
558  }
#define TIMESTAMP

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