OmniSciDB  471d68cefb
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 547 of file MapDSqlOperatorTable.java.

Constructor & Destructor Documentation

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

Definition at line 548 of file MapDSqlOperatorTable.java.

548  {
549  super("PG_DATE_TRUNC",
550  SqlKind.OTHER_FUNCTION,
551  null,
552  null,
553  OperandTypes.family(SqlTypeFamily.STRING, SqlTypeFamily.DATETIME),
554  SqlFunctionCategory.SYSTEM);
555  }

Member Function Documentation

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

Definition at line 558 of file MapDSqlOperatorTable.java.

References TIMESTAMP.

558  {
559  final RelDataTypeFactory typeFactory = opBinding.getTypeFactory();
560  return typeFactory.createTypeWithNullability(
561  typeFactory.createSqlType(
562  SqlTypeName.TIMESTAMP, opBinding.getOperandType(1).getPrecision()),
563  opBinding.getOperandType(1).isNullable());
564  }
#define TIMESTAMP

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