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


##########
be/src/service/point_query_executor.cpp:
##########
@@ -345,10 +354,7 @@ Status PointQueryExecutor::init(const 
PTabletKeyLookupRequest* request,
                                                *_tablet->tablet_schema(), 1));
         }
     }
-    // Set timezone from request for functions like from_unixtime()
-    if (request->has_time_zone() && !request->time_zone().empty()) {
-        _reusable->runtime_state()->set_timezone(request->time_zone());
-    }
+    _reusable->update_runtime_state(*request);

Review Comment:
   Fixed in 00ad2d00ea0. PTabletKeyLookupRequest is now passed into 
Reusable::init(), and update_runtime_state(request) runs immediately after 
RuntimeState creation, before expression prepare/open, so fragment-local 
constant materialization sees the request timezone and timestamp. Cache hits 
still refresh the runtime state per request. I also extended 
point_query_p0/test_point_query.groovy with the suggested 
debug_skip_fold_constant=true, time_zone=+00:00, and all-constant 
from_unixtime(20) output. clang-format 16 passed; the local BE UT attempt was 
blocked during CMake configuration because OpenMP_C was unavailable for 
OpenBLAS.



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/load/NereidsStreamLoadPlanner.java:
##########
@@ -324,20 +331,41 @@ public TPipelineFragmentParams plan(TUniqueId loadId, int 
fragmentInstanceIdInde
         queryOptions.setNewVersionUnixTimestamp(true);
         queryOptions.setNewVersionPercentile(true);
         params.setQueryOptions(queryOptions);
+        params.setQueryGlobals(createQueryGlobals());

Review Comment:
   Fixed in 00ad2d00ea0. The cached GroupCommitPlanner now retains the 
TPipelineFragmentParamsList, refreshes every fragment's TQueryGlobals from the 
current StatementContext, and reserializes execPlanFragmentParamsBytes before 
each prepared execution. This preserves planner reuse while updating 
timestamp_ms, nano_seconds, now_string, and time_zone for every execution. 
Added GroupCommitPlannerTest to serialize the same cached params with two 
different statement times/time zones and verify the resulting globals; 
./run-fe-ut.sh --run org.apache.doris.planner.GroupCommitPlannerTest passed 
(1/1), including Checkstyle.



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