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


##########
be/src/service/point_query_executor.cpp:
##########
@@ -308,6 +318,7 @@ Status PointQueryExecutor::init(const 
PTabletKeyLookupRequest* request,
     _tablet = DORIS_TRY(ExecEnv::get_tablet(request->tablet_id()));
     if (cache_handle != nullptr) {
         _reusable = cache_handle;
+        _reusable->update_runtime_state(*request);

Review Comment:
   Fixed in ad5b00bb43e. Reusable::update_runtime_state now refreshes the 
request timezone/timestamp and recursively clears every cached output 
expression constant, so the next write rematerializes constant trees against 
the current RuntimeState instead of returning the first execution's 
_constant_col. I also changed the point-query regression to execute one 
prepared from_unixtime(20) query in +00:00, switch the same session to +08:00, 
and execute it again through the cache-hit path, expecting 00:00:20 then 
08:00:20. clang-format 16 and check-format passed. The local BE UT attempt is 
still blocked during macOS CMake configuration because OpenMP_C is unavailable 
for OpenBLAS.



##########
fe/fe-core/src/main/java/org/apache/doris/statistics/BaseAnalysisTask.java:
##########
@@ -646,7 +650,7 @@ protected void runQuery(String sql) {
         String queryId = "";
         try (AutoCloseConnectContext a  = 
StatisticsUtil.buildConnectContext(false)) {
             a.connectContext.getState().setPlanWithUnKnownColumnStats(true);
-            stmtExecutor = new StmtExecutor(a.connectContext, sql);
+            stmtExecutor = new StmtExecutor(a.connectContext, sql, 
statementStartTime);

Review Comment:
   Fixed in ad5b00bb43e. BaseAnalysisTask.execute now captures a canonical 
ZoneId together with statementStartTime. A shared createStmtExecutor helper 
passes both values into the new StmtExecutor constructor, and runQuery, 
runInsert, and OlapAnalysisTask.collectMinMax all use that helper, so later 
ConnectContext instances cannot change the task timezone. BaseAnalysisTaskTest 
now creates two internal statements with fresh contexts set to +00:00 and 
+08:00 and verifies both StatementContexts retain the task's captured UTC zone. 
./run-fe-ut.sh --run org.apache.doris.statistics.BaseAnalysisTaskTest passed 
4/4, 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