OmniSciDB  06b3bd477c
 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 554 of file MapDSqlOperatorTable.java.

Constructor & Destructor Documentation

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

Definition at line 555 of file MapDSqlOperatorTable.java.

555  {
556  super("PG_DATE_TRUNC",
557  SqlKind.OTHER_FUNCTION,
558  null,
559  null,
560  OperandTypes.family(SqlTypeFamily.STRING, SqlTypeFamily.DATETIME),
561  SqlFunctionCategory.SYSTEM);
562  }

Member Function Documentation

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

Definition at line 565 of file MapDSqlOperatorTable.java.

565  {
566  final RelDataTypeFactory typeFactory = opBinding.getTypeFactory();
567  return typeFactory.createTypeWithNullability(
568  typeFactory.createSqlType(
569  SqlTypeName.TIMESTAMP, opBinding.getOperandType(1).getPrecision()),
570  opBinding.getOperandType(1).isNullable());
571  }

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