dhirenda-gautam commented on a change in pull request #1714: [Calcite 3663] 
Support for TRIM function in BigQuery dialect
URL: https://github.com/apache/calcite/pull/1714#discussion_r362846450
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/sql/dialect/BigQuerySqlDialect.java
 ##########
 @@ -192,6 +197,37 @@ public BigQuerySqlDialect(SqlDialect.Context context) {
     }
   }
 
+  /**
+   * For usage of TRIM, LTRIM and RTRIM in BQ see
+   * <a 
href="https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#trim";>
+   *  BQ Trim Function</a>.
+   */
+  private void unparseTrim(SqlWriter writer, SqlCall call, int leftPrec,
+      int rightPrec) {
+    assert call.operand(0) instanceof SqlLiteral : call.operand(0);
 
 Review comment:
   Removed this assert as the operands type check is already done in 
SqlTrimFunction class

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