OmniSciDB  3a86f6ec37
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 776 of file MapDSqlOperatorTable.java.

Constructor & Destructor Documentation

◆ PgDateTrunc()

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

Definition at line 777 of file MapDSqlOperatorTable.java.

777  {
778  super("PG_DATE_TRUNC",
779  SqlKind.OTHER_FUNCTION,
780  null,
781  null,
782  OperandTypes.family(SqlTypeFamily.STRING, SqlTypeFamily.DATETIME),
783  SqlFunctionCategory.SYSTEM);
784  }

Member Function Documentation

◆ inferReturnType()

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

Definition at line 787 of file MapDSqlOperatorTable.java.

787  {
788  final RelDataTypeFactory typeFactory = opBinding.getTypeFactory();
789  return typeFactory.createTypeWithNullability(
790  typeFactory.createSqlType(
791  SqlTypeName.TIMESTAMP, opBinding.getOperandType(1).getPrecision()),
792  opBinding.getOperandType(1).isNullable());
793  }

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