HappenLee commented on code in PR #68672:
URL: https://github.com/apache/doris/pull/68672#discussion_r4175990131
##########
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:
Addressed in 9180e96509b5b7b4816cde183bcc667b5c18326d.
`VirtualSlotRef::get_digest()` now returns 0, so the existing parent-expression
and scan-conjunct propagation disables condition-cache reads and writes for
virtual-column predicates.
Added BE tests for both constructors, CAST-parent propagation and the
scanner digest helper. The regression checks actual virtual-column plans,
compares two different definitions with uncached base-column reference queries,
and requires zero cache lookups. It retains the existing positive
deterministic-cache-hit check.
The original `x = 0 AND x < 5` shape is simplified by this FE and does not
create a virtual slot. Using `abs(k + 1) + abs(k + 1) = 0` followed by `abs(k -
9999) + abs(k - 9999) = 0` does create virtual slots and reproduced the issue
on the existing pre-fix ASAN BE: the second query returned no rows while the
uncached reference returned `9999`.
Validation: clang-format 16.0.6, header hygiene, diff checks and clang-tidy
passed. BE UT execution and post-fix runtime validation are blocked by the
local dependency set missing `libpaimon_c.a`; those passes are not claimed.
--
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]