HappenLee commented on code in PR #70941:
URL: https://github.com/apache/doris/pull/70941#discussion_r4694853622


##########
fe/fe-core/src/main/java/org/apache/doris/qe/PointQueryExecutor.java:
##########
@@ -428,6 +428,7 @@ private InternalService.PTabletKeyLookupRequest 
buildLookupRequest(boolean inclu
         // Set timezone for functions like from_unixtime
         requestBuilder.setTimeZone(TimeUtils.getCanonicalTimeZone(
                 ConnectContext.get().getSessionVariable().getTimeZone()));
+        
requestBuilder.setLcTimeNames(ConnectContext.get().getSessionVariable().getLcTimeNames());

Review Comment:
   **[P1] Invalidate FE prepared point-query expressions when `lc_time_names` 
changes.**
   
   With BE constant folding enabled, a prepared point query that projects both 
`MONTHNAME(d)` and `MONTHNAME(CAST('2026-11-17' AS DATE))` can cache `十一月` as a 
literal in `ShortCircuitQueryContext.serializedOutputExpr` under `zh_CN`. After 
switching to `en_US`, `ShortCircuitQueryContext.isReusable()` still accepts the 
cached FE plan. The BE detects the locale change and requests a full lookup, 
but that lookup carries the same serialized expressions. The column expression 
can return `November` while the folded literal still returns `十一月`.
   
   Could we include `lc_time_names` in the FE reuse check and add a 
server-prepared regression that combines BE constant folding with a locale 
change?



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