cloud-fan commented on a change in pull request #35494:
URL: https://github.com/apache/spark/pull/35494#discussion_r811622809



##########
File path: 
sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/GeneralScalarExpression.java
##########
@@ -22,20 +22,46 @@
 import org.apache.spark.annotation.Evolving;
 
 /**
- * The general SQL string corresponding to expression.
+ * The general V2 expression corresponding to V1 expression.
+ * <p>
+ * The currently supported expression:
+ * <ol>
+ *  <li><pre>CASE WHEN expr1 THEN expr2 [WHEN expr3 THEN expr4]* [ELSE expr5] 
END</pre>
+ *  Since 3.3.0</li>
+ * </ol>
  *
  * @since 3.3.0
  */
 @Evolving
-public class GeneralSQLExpression implements Expression, Serializable {
-    private String sql;
+public class GeneralScalarExpression implements Expression, Serializable {
+  private String name;
+  private Expression[] children;
+  private String sql;

Review comment:
       setting SQL string is pretty ugly. Can't we just implement the `sql` 
method in this class with `V2ExpressionSQLBuilder`?




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