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


##########
fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java:
##########
@@ -1544,6 +1545,36 @@ public enum IgnoreSplitType {
     @VarAttrDef.VarAttr(name = ENABLE_QUERY_CACHE, fuzzy = true)
     public boolean enableQueryCache = false;
 
+    // Allow BE to reuse a stale query cache entry by scanning only the delta
+    // rowsets since the cached version and merging them with the cached 
partial
+    // aggregation blocks. Only takes effect when the cache point aggregation 
is
+    // non-finalize (its output is merged again upstream) and the selected 
index
+    // is append-only: DUP_KEYS, or merge-on-write UNIQUE_KEYS whose delta did
+    // not rewrite pre-existing keys (BE checks the delete bitmap per tablet);
+    // BE falls back to a full recompute whenever the delta cannot be captured
+    // (compacted away), contains delete predicates or rewrites history rows.
+    // Experimental: shown as `experimental_enable_query_cache_incremental` and
+    // settable with or without the prefix; to be promoted to 
EXPERIMENTAL_ONLINE
+    // once it graduates.
+    @VarAttrDef.VarAttr(name = ENABLE_QUERY_CACHE_INCREMENTAL,
+            varType = VariableAnnotation.EXPERIMENTAL, needForward = true,

Review Comment:
   [P2] Forward the prerequisite query-cache switch as well
   
   This forwards `enable_query_cache_incremental`, but its documented 
prerequisite `enable_query_cache` is not marked `needForward` (or 
result-affecting). Forwarded statements run in a fresh master-side 
`ConnectContext`, and `getForwardVariables()` sends only annotated variables, 
so a client that enables both switches on a follower reaches the master with 
the incremental flag true but `enable_query_cache` still at its default false. 
Both planner gates then skip query-cache normalization entirely. Please forward 
the base switch too and cover the follower-to-master case.
   



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