You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "rewerma (via GitHub)" <gi...@apache.org> on 2023/08/14 09:21:19 UTC

[GitHub] [seatunnel] rewerma commented on a diff in pull request #5014: [Feature][Transform-V2][SQL] Support case when clause for SQL Transform plugin (#5013)

rewerma commented on code in PR #5014:
URL: https://github.com/apache/seatunnel/pull/5014#discussion_r1292008225


##########
seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/sql/zeta/ZetaSQLType.java:
##########
@@ -149,6 +163,74 @@ public SeaTunnelDataType<?> getExpressionType(Expression expression) {
                 String.format("Unsupported SQL Expression: %s ", expression.toString()));
     }
 
+    public SeaTunnelDataType<?> getMaxType(

Review Comment:
   Since uncertain return types are not supported, it is necessary to ensure that the type for each return value remains consistent. Can we modify this code to only check the type of the first return value? Subsequently, it will be necessary to validate whether the types of each return value are consistent.



##########
seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/sql/zeta/ZetaSQLFunction.java:
##########
@@ -435,6 +456,35 @@ public Object executeTimeKeyExpr(String timeKeyExpr) {
                 String.format("Unsupported TimeKey expression: %s", timeKeyExpr));
     }
 
+    boolean isBooleanExpr(Expression expression) {

Review Comment:
   Moving the method to the `ZetaSQLFilter` class and naming it `isConditionExpr` would be preferable.



-- 
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: commits-unsubscribe@seatunnel.apache.org

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