wangbo commented on a change in pull request #3396:
URL: https://github.com/apache/incubator-doris/pull/3396#discussion_r417730477
##########
File path: fe/src/main/java/org/apache/doris/analysis/CaseExpr.java
##########
@@ -251,4 +257,72 @@ public void analyzeImpl(Analyzer analyzer) throws
AnalysisException {
}
return exprs;
}
+
+ // this method just compare literal value and not completely consistent
with be,for two cases
+ // 1 not deal float
+ // 2 just compare literal value with same type. for a example sql 'select
case when 123 then '1' else '2' end as col'
+ // for be will return '1', because be only regard 0 as false
+ // but for current LiteralExpr.compareLiteral, `123`' won't be regard
as true
+ // the case which two values has different type left to be
+ public static Expr computeCaseExpr(CaseExpr expr) {
+ LiteralExpr caseExpr;
+ int startIndex = 0;
Review comment:
yes, be logic is right.I'll fix it
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]