OmniSciDB  b24e664e58
 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 517 of file MapDSqlOperatorTable.java.

Constructor & Destructor Documentation

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

Definition at line 518 of file MapDSqlOperatorTable.java.

518  {
519  super("PG_DATE_TRUNC",
520  SqlKind.OTHER_FUNCTION,
521  null,
522  null,
523  OperandTypes.family(SqlTypeFamily.STRING, SqlTypeFamily.DATETIME),
524  SqlFunctionCategory.SYSTEM);
525  }

Member Function Documentation

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

Definition at line 528 of file MapDSqlOperatorTable.java.

528  {
529  final RelDataTypeFactory typeFactory = opBinding.getTypeFactory();
530  return typeFactory.createTypeWithNullability(
531  typeFactory.createSqlType(
532  SqlTypeName.TIMESTAMP, opBinding.getOperandType(1).getPrecision()),
533  opBinding.getOperandType(1).isNullable());
534  }

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