OmniSciDB  2e3a973ef4
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 555 of file MapDSqlOperatorTable.java.

Constructor & Destructor Documentation

◆ PgDateTrunc()

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

Definition at line 556 of file MapDSqlOperatorTable.java.

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

Member Function Documentation

◆ inferReturnType()

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

Definition at line 566 of file MapDSqlOperatorTable.java.

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

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