danny0405 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_r292450943
 
 

 ##########
 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:
   It seems that the `::` operator is equivalent to `CAST` operator [1], so the 
we only need to do 2 things:
   
   1. support expression parse for `::`
   2. customize the unparse for `CAST` operator for `POSTGRES` dialect, but 
because it's equivalent, unparse to `::` seems not that necessary.
   
   [1] https://www.postgresql.org/docs/8.1/sql-syntax.html

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to