chenzhx commented on code in PR #36330:
URL: https://github.com/apache/spark/pull/36330#discussion_r858368663


##########
sql/catalyst/src/main/java/org/apache/spark/sql/connector/util/V2ExpressionSQLBuilder.java:
##########
@@ -228,4 +241,37 @@ protected String visitSQLFunction(String funcName, 
String[] inputs) {
   protected String visitUnexpectedExpr(Expression expr) throws 
IllegalArgumentException {
     throw new IllegalArgumentException("Unexpected V2 expression: " + expr);
   }
+
+  protected String visitOverlay(String funcName, String[] inputs) {
+    if (inputs.length <= 3) {
+      return funcName + "(" + inputs[0] + " PLACING " + inputs[1] + " FROM " + 
inputs[2] +")";
+    } else {
+      return funcName + "(" + inputs[0] + " PLACING " + inputs[1] + " FROM " + 
inputs[2] +
+              " FOR " + inputs[3] +")";
+    }
+  }
+
+  protected String visitTrim(String[] inputs) {

Review Comment:
   If we add parameter direction, we need to create new 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.

To unsubscribe, e-mail: [email protected]

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to