OmniSciDB  29e35f4d58
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 546 of file MapDSqlOperatorTable.java.

Constructor & Destructor Documentation

◆ PgDateTrunc()

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

Definition at line 547 of file MapDSqlOperatorTable.java.

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

Member Function Documentation

◆ inferReturnType()

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

Definition at line 557 of file MapDSqlOperatorTable.java.

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

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