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


##########
fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java:
##########
@@ -2193,7 +2193,11 @@ public boolean isEnableHboNonStrictMatchingMode() {
     // Whether enable two phase read optimization
     // 1. read related rowids along with necessary column data
     // 2. spawn fetch RPC to other nodes to get related data by sorted rowids
-    @VarAttrDef.VarAttr(name = ENABLE_TWO_PHASE_READ_OPT, fuzzy = true)
+    @VarAttrDef.VarAttr(name = ENABLE_TWO_PHASE_READ_OPT, fuzzy = true, 
varType = VariableAnnotation.DEPRECATED,

Review Comment:
   This deprecates `enable_two_phase_read_opt`, but it no longer preserves the 
old disable behavior. The removed 
`DeferMaterializeTopNResult#getTopNOptLimitThreshold()` used 
`enableTwoPhaseReadOpt=false` to return `-1`, so statements/tests that set 
`enable_two_phase_read_opt=false` disabled two-phase TopN reads. After this PR, 
the replacement path is gated by `PlanPostProcessors` calling 
`enableTopnLazyMaterialization()`, which only checks 
`topNLazyMaterializationThreshold > 0` and ignores this flag. That means 
existing `SET_VAR(enable_two_phase_read_opt=false)` hints and code such as 
`TableQueryPlanAction#setEnableTwoPhaseReadOpt(false)` can still generate lazy 
materialization by default. Please either keep this flag in the new gate/setter 
during the deprecation period, or migrate every caller/test to set 
`topn_lazy_materialization_threshold=-1` so the documented replacement is 
actually enforced.



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