morrySnow commented on code in PR #29362:
URL: https://github.com/apache/doris/pull/29362#discussion_r1439443047
##########
fe/fe-core/src/main/java/org/apache/doris/load/loadv2/BrokerLoadJob.java:
##########
@@ -209,13 +209,15 @@ private void createLoadingTask(Database db,
BrokerPendingTaskAttachment attachme
List<BrokerFileGroup> brokerFileGroups = entry.getValue();
long tableId = aggKey.getTableId();
OlapTable table = (OlapTable) db.getTableNullable(tableId);
+ boolean isEnableMemtableOnSinkNode = !((OlapTable)
table).getTableProperty().getUseSchemaLightChange()
+ ? false : this.enableMemTableOnSinkNode;
Review Comment:
```suggestion
boolean isEnableMemtableOnSinkNode = ((OlapTable)
table).getTableProperty().getUseSchemaLightChange()
? this.enableMemTableOnSinkNode: false;
```
##########
fe/fe-core/src/main/java/org/apache/doris/planner/StreamLoadPlanner.java:
##########
@@ -542,7 +544,10 @@ public TPipelineFragmentParams planForPipeline(TUniqueId
loadId, int fragmentIns
queryOptions.setEnablePipelineEngine(Config.enable_pipeline_load);
queryOptions.setBeExecVersion(Config.be_exec_version);
queryOptions.setIsReportSuccess(taskInfo.getEnableProfile());
-
queryOptions.setEnableMemtableOnSinkNode(taskInfo.isMemtableOnSinkNode());
+ boolean isEnableMemtableOnSinkNode =
+ ! destTable.getTableProperty().getUseSchemaLightChange()
+ ? false : taskInfo.isMemtableOnSinkNode();
Review Comment:
```suggestion
destTable.getTableProperty().getUseSchemaLightChange()
? taskInfo.isMemtableOnSinkNode() : false;
```
##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -1226,6 +1227,14 @@ private void analyzeAndGenerateQueryPlan(TQueryOptions
tQueryOptions) throws Use
}
profile.getSummaryProfile().setQueryAnalysisFinishTime();
planner = new OriginalPlanner(analyzer);
+ if (parsedStmt instanceof InsertStmt) {
+ boolean isEnableMemtableOnSinkNode =
+ ! ((OlapTable) ((InsertStmt)
parsedStmt).getTargetTable())
Review Comment:
ditto
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/InsertIntoTableCommand.java:
##########
@@ -145,13 +148,20 @@ private void runInternal(ConnectContext ctx, StmtExecutor
executor) throws Excep
LogicalPlanAdapter logicalPlanAdapter = new
LogicalPlanAdapter(logicalQuery, ctx.getStatementContext());
NereidsPlanner planner = new
NereidsPlanner(ctx.getStatementContext());
- planner.plan(logicalPlanAdapter,
ctx.getSessionVariable().toThrift());
+ StatementBase parsedStmt = executor.getParsedStmt();
+ TQueryOptions queryOptions = ctx.getSessionVariable().toThrift();
+ boolean isEnableMemtableOnSinkNode =
+ ! ((OlapTable) ((InsertStmt)
parsedStmt).getTargetTable())
+ .getTableProperty()
+ .getUseSchemaLightChange()
+ ? false : queryOptions.isEnableMemtableOnSinkNode();
Review Comment:
```suggestion
boolean isEnableMemtableOnSinkNode =
((OlapTable) ((InsertStmt)
parsedStmt).getTargetTable())
.getTableProperty()
.getUseSchemaLightChange()
? queryOptions.isEnableMemtableOnSinkNode() : false;
```
##########
fe/fe-core/src/main/java/org/apache/doris/planner/StreamLoadPlanner.java:
##########
@@ -319,8 +319,10 @@ public TExecPlanFragmentParams plan(TUniqueId loadId, int
fragmentInstanceIdInde
queryOptions.setEnablePipelineEngine(Config.enable_pipeline_load);
queryOptions.setBeExecVersion(Config.be_exec_version);
queryOptions.setIsReportSuccess(taskInfo.getEnableProfile());
-
queryOptions.setEnableMemtableOnSinkNode(taskInfo.isMemtableOnSinkNode());
-
+ boolean isEnableMemtableOnSinkNode =
+ ! destTable.getTableProperty().getUseSchemaLightChange()
+ ? false : taskInfo.isMemtableOnSinkNode();
Review Comment:
```suggestion
destTable.getTableProperty().getUseSchemaLightChange()
? taskInfo.isMemtableOnSinkNode() : false;
```
--
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]