Reminiscent commented on code in PR #20334: URL: https://github.com/apache/doris/pull/20334#discussion_r1217808848
########## fe/fe-core/src/main/java/org/apache/doris/analysis/Expr.java: ########## @@ -989,7 +989,8 @@ public TExpr treeToThrift() { // 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); + Preconditions.checkState(this instanceof NullLiteral || this instanceof SlotRef + || this instanceof VariableExpr); Review Comment: Because when we `set @a=null` and use the `@a` in the statement, for example, `select @a ....`. The `@a` will be built as `VariableExpr` not the `NullLiteral` -- 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-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org