andrej-db commented on code in PR #48621:
URL: https://github.com/apache/spark/pull/48621#discussion_r1814673314


##########
sql/catalyst/src/main/java/org/apache/spark/sql/connector/util/V2ExpressionSQLBuilder.java:
##########
@@ -219,6 +219,10 @@ protected String inputToSQL(Expression input) {
     }
   }
 
+  protected String inputToCaseWhenSQL(Expression input) {
+    return "CASE WHEN " + inputToSQL(input) + " THEN 1 ELSE 0 END";

Review Comment:
   I see, ok. How should we reformat this?
   ```suggestion
       if (input is literal) => inputToSql(input)
       else =>
       return "CASE WHEN " + inputToSQL(input) + " THEN 1 ELSE 0 END";
   ```



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to