morrySnow commented on code in PR #46465:
URL: https://github.com/apache/doris/pull/46465#discussion_r1942322271
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java:
##########
Review Comment:
maybe need fix in next PR: all set var logic in `hint` should finished
before parse original sql
##########
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4:
##########
@@ -1243,7 +1243,8 @@ qualifyClause
selectHint: hintStatements+=hintStatement (COMMA?
hintStatements+=hintStatement)* HINT_END;
hintStatement
- : hintName=identifier (LEFT_PAREN parameters+=hintAssignment (COMMA?
parameters+=hintAssignment)* RIGHT_PAREN)?
+ : SET_VAR LEFT_PAREN variable (COMMA variable)* RIGHT_PAREN
Review Comment:
why add a explicit `SET_VAR` syntax?
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/EliminateLogicalSelectHint.java:
##########
@@ -52,9 +51,7 @@ public Rule build() {
LogicalSelectHint<Plan> selectHintPlan = ctx.root;
for (SelectHint hint : selectHintPlan.getHints()) {
String hintName = hint.getHintName();
- if (hintName.equalsIgnoreCase("SET_VAR")) {
- ((SelectHintSetVar)
hint).setVarOnceInSql(ctx.statementContext);
Review Comment:
maybe just remove this is all we need?
--
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]