OmniSciDB  c07336695a
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 485 of file MapDSqlOperatorTable.java.

Constructor & Destructor Documentation

◆ PgDateTrunc()

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

Definition at line 486 of file MapDSqlOperatorTable.java.

486  {
487  super("PG_DATE_TRUNC",
488  SqlKind.OTHER_FUNCTION,
489  null,
490  null,
491  OperandTypes.family(SqlTypeFamily.STRING, SqlTypeFamily.DATETIME),
492  SqlFunctionCategory.SYSTEM);
493  }

Member Function Documentation

◆ inferReturnType()

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

Definition at line 496 of file MapDSqlOperatorTable.java.

496  {
497  final RelDataTypeFactory typeFactory = opBinding.getTypeFactory();
498  return typeFactory.createTypeWithNullability(
499  typeFactory.createSqlType(
500  SqlTypeName.TIMESTAMP, opBinding.getOperandType(1).getPrecision()),
501  opBinding.getOperandType(1).isNullable());
502  }

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