morrySnow commented on code in PR #10947:
URL: https://github.com/apache/doris/pull/10947#discussion_r923277657


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/ExpressionTranslator.java:
##########
@@ -213,6 +218,23 @@ public Expr visitStringRegexPredicate(StringRegexPredicate 
stringRegexPredicate,
                 stringRegexPredicate.right().accept(this, context));
     }
 
+    @Override
+    public Expr visitCaseWhen(CaseWhen caseWhen, PlanTranslatorContext 
context) {
+        List<CaseWhenClause> caseWhenClauses = new ArrayList<>();
+        for (WhenClause whenClause : caseWhen.getWhenClauses()) {
+            caseWhenClauses.add(new CaseWhenClause(
+                    whenClause.left().accept(this, context),
+                    whenClause.right().accept(this, context)
+            ));
+        }
+        Expr elseExpr = null;
+        Optional<Expression> defaultValue = caseWhen.getDefaultValue();

Review Comment:
   nit: Optional is unnecessary



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