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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java:
##########
@@ -2233,11 +2235,26 @@ public List<Pair<LogicalPlan, StatementContext>> 
visitMultiStatements(MultiState
                 connectContext.setStatementContext(statementContext);
                 statementContext.setConnectContext(connectContext);
             }
-            logicalPlans.add(Pair.of(
-                    ParserUtils.withOrigin(ctx, () -> (LogicalPlan) 
visit(statement)), statementContext));
-            List<Placeholder> params = new 
ArrayList<>(tokenPosToParameters.values());
-            statementContext.setPlaceholders(params);
-            tokenPosToParameters.clear();
+            try {
+                logicalPlans.add(Pair.of(
+                        ParserUtils.withOrigin(ctx, () -> (LogicalPlan) 
visit(statement)), statementContext));
+                List<Placeholder> params = new 
ArrayList<>(tokenPosToParameters.values());
+                statementContext.setPlaceholders(params);
+                tokenPosToParameters.clear();
+            } finally {
+                if (connectContext != null) {
+                    SessionVariable sessionVariable = 
connectContext.getSessionVariable();
+                    if (sessionVariable.getIsSingleSetVar()) {

Review Comment:
   Fixed in 92e65f470a3. LogicalPlanBuilder now snapshots the caller-owned 
SET_VAR flag, origin map, and live scoped values before parsing, and restores 
only mutations introduced by the current parsed statement. A hint-free INSERT 
therefore leaves generateHttpStreamPlan()'s enable_strict_consistency_dml=false 
scope intact, including the origin map needed by the caller's final cleanup. 
Added RequestPropertyDeriverTest coverage that parses the HTTP-stream INSERT 
and verifies the PhysicalOlapTableSink child requirement remains ANY. The 
targeted FE run passed all 120 tests; BE UT and regression tests were not run 
per request.



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