You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "morrySnow (via GitHub)" <gi...@apache.org> on 2023/06/07 03:01:35 UTC

[GitHub] [doris] morrySnow commented on a diff in pull request #20509: [Bug](planner) fix pre condition check fail on max(null)

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


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/Expr.java:
##########
@@ -986,14 +986,6 @@ public String toColumnLabel() {
 
     // Convert this expr, including all children, to its Thrift representation.
     public TExpr treeToThrift() {
-        if (type.isNull()) {
-            // Hack to ensure BE never sees TYPE_NULL. If an expr makes it this far without
-            // being cast to a non-NULL type, the type doesn't matter and we can cast it
-            // arbitrarily.
-            Preconditions.checkState(this instanceof NullLiteral || this instanceof SlotRef
-                    || this instanceof VariableExpr);
-            return NullLiteral.create(ScalarType.BOOLEAN).treeToThrift();
-        }

Review Comment:
   remove this means be could process all expressions with null type?



-- 
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@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org