924060929 commented on code in PR #66383:
URL: https://github.com/apache/doris/pull/66383#discussion_r3703089383
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertOverwriteTableCommand.java:
##########
@@ -228,6 +227,12 @@ public void run(ConnectContext ctx, StmtExecutor executor)
throws Exception {
isRunning.set(true);
long taskId = 0;
try {
+ // OLAP overwrite runs its internal partition replacement with the
auth check skipped.
+ // Set the flag here, inside the try, so the finally below always
pairs the reset even if
+ // an earlier step (e.g. the @branch guard) throws before we get
here.
+ if (physicalTableSink instanceof PhysicalOlapTableSink &&
targetTable instanceof OlapTable) {
+ ConnectContext.get().setSkipAuth(true);
Review Comment:
use local variable `ctx` instead of
--
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]