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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java:
##########
@@ -949,6 +947,8 @@ private PlanFragment 
computePhysicalOlapScan(PhysicalOlapScan olapScan, PlanTran
 
         OlapScanNode olapScanNode = new OlapScanNode(context.nextPlanNodeId(), 
tupleDescriptor, "OlapScanNode",
                 context.getScanContext());
+        olapScanNode.setEnableConditionCache(
+                
!ExpressionUtils.containsNonCacheableExpression(olapScan.getVirtualColumns()));

Review Comment:
   [P1] Include virtual-column definitions in the condition-cache key. With 
`experimental_enable_virtual_slot_for_cse=true` on a DUP table containing 
`k=0..9999`, repeated `abs(k + 1)` and `abs(k - 9999)` predicates can each 
become a virtual slot under the scan. Both scans remain eligible here. BE 
hashes the outer `VirtualSlotRef` and identical comparisons but omits the 
separately stored virtual definition; the seed contains session variables only. 
If `abs(k + 1) = 0 AND abs(k + 1) < 5` first caches an all-false granule, 
`abs(k - 9999) = 0 AND abs(k - 9999) < 5` can reuse it and skip the matching 
`k=9999` row. Hash referenced virtual definitions or disable condition cache 
for scans whose predicates use virtual slots, and cover the two-query 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