github-actions[bot] commented on code in PR #64366:
URL: https://github.com/apache/doris/pull/64366#discussion_r3400723158


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ExecuteCommand.java:
##########
@@ -87,6 +87,7 @@ public void run(ConnectContext ctx, StmtExecutor executor) 
throws Exception {
         }
         PrepareCommand prepareCommand = preparedStmtCtx.command;
         StatementContext statementContext = 
preparedStmtCtx.getStatementContext();
+        statementContext.resetStatementStartTime();

Review Comment:
   This reset does not reach the reusable short-circuit point-query path below. 
When `statementContext.isShortCircuitQuery()` is true, 
`directExecuteShortCircuitQuery()` builds a `PTabletKeyLookupRequest`, but that 
proto only carries `time_zone`; BE `PointQueryExecutor::Reusable::init()` 
creates a `RuntimeState` without `TQueryGlobals`, and 
`PointQueryExecutor::init()` only refreshes timezone on later cached 
executions. A prepared point query such as `select now(6), v from <unique-key 
rowstore table> where k = ?` can therefore evaluate BE `now()` from the default 
or cached runtime timestamp instead of the per-execution `statementStartTime` 
reset here. Please pass `timestamp_ms` and `nano_seconds` through the 
point-query request and refresh the reusable runtime state on every execution, 
the same way timezone is refreshed.



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