cjj2010 commented on code in PR #4818:
URL: https://github.com/apache/calcite/pull/4818#discussion_r2929297104


##########
core/src/main/java/org/apache/calcite/util/RelToSqlConverterUtil.java:
##########
@@ -463,4 +445,22 @@ public ClickHouseSqlArrayTypeNameSpec(SqlTypeNameSpec 
elementTypeName,
       writer.endList(frame);
     }
   }
+
+  /**
+   * Unparses REGEXP function calls by converting from function call format
+   * (e.g., REGEXP(column, pattern)) to infix operator format (e.g., column 
REGEXP pattern).
+   */
+  public static void unparseRegexp(SqlWriter writer, SqlCall call, int 
leftPrec, int rightPrec) {
+    if (call.operandCount() != 2) {
+      throw new IllegalArgumentException("REGEXP operator requires exactly 2 
operands");

Review Comment:
   > This line of code was not covered by tests.
   
   I tried to execute REGEXP ("brandname"), which checks for errors during the 
SQL parsing validation phase and does not enter the dialect parsing phase. I 
think I need to remove the judgment logic in the code



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to