morrySnow commented on code in PR #64366:
URL: https://github.com/apache/doris/pull/64366#discussion_r3412944799
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/load/NereidsStreamLoadPlanner.java:
##########
@@ -320,20 +321,22 @@ public TPipelineFragmentParams plan(TUniqueId loadId, int
fragmentInstanceIdInde
queryOptions.setNewVersionUnixTimestamp(true);
queryOptions.setNewVersionPercentile(true);
params.setQueryOptions(queryOptions);
+ params.setQueryGlobals(createQueryGlobals());
+ params.setTableName(destTable.getName());
+ params.setIsMowTable(destTable.getEnableUniqueKeyMergeOnWrite());
+ return params;
+ }
+
+ TQueryGlobals createQueryGlobals() {
TQueryGlobals queryGlobals = new TQueryGlobals();
queryGlobals.setNowString(TimeUtils.getDatetimeFormatWithTimeZone().format(LocalDateTime.now()));
Review Comment:
Fixed in `253316e04a2`.
The change captures `taskInfo.getStatementStartTime()` once in
`NereidsLoadPlanInfoCollector` and uses it to create every planning
`StatementContext`. Both `collectLoadPlanInfo()` plan translation and
`getAllPartitionIds()` partition pruning now build their `CascadesContext` from
that task timestamp. This keeps FE constant folding/partition selection aligned
with the same timestamp later written to `TQueryGlobals` for BE execution.
Added coverage in `NereidsStreamLoadPlannerTest` to verify the collector
context preserves the exact task `Instant`. Verified with:
`./run-fe-ut.sh --run
org.apache.doris.nereids.load.NereidsStreamLoadPlannerTest`
Result: 2 tests passed.
--
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]