You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/06/08 08:45:18 UTC

[GitHub] [calcite] MGelbana commented on a change in pull request #1066: [CALCITE-2843] Babel parser should support PostgreSQL casting operator '::'

MGelbana commented on a change in pull request #1066: [CALCITE-2843] Babel parser should support PostgreSQL casting operator '::'
URL: https://github.com/apache/calcite/pull/1066#discussion_r291799393
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/sql/fun/SqlStdOperatorTable.java
 ##########
 @@ -270,6 +270,11 @@
           null,
           OperandTypes.EXACT_NUMERIC_EXACT_NUMERIC);
 
+  /**
+   * Casting operator used by PostgreSQL '<code>::</code>'.
+   */
+  public static final SqlBinaryOperator PG_CAST = new PostgreSQLCastOperator();
+
 
 Review comment:
   The new operator is to have a special unparsing logic so when this operator is unparsed, it's unparsed as `OP1 :: Type` instead of `CAST(OP1 AS Type`.
   I believe it's ok to unparse it as a `CAST` function but I'll still have to parse this special binary operator and produce a function insted.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services