LuciferYang commented on code in PR #68521:
URL: https://github.com/apache/doris/pull/68521#discussion_r4112071477


##########
be/src/storage/segment/segment_iterator.cpp:
##########
@@ -1265,6 +1272,25 @@ Status SegmentIterator::_apply_index_expr() {
             break;
         }
         ++considered_conjuncts;
+        // A hidden placeholder column's inverted index holds the on-disk 
placeholder, not the value
+        // rows come back with. Evaluating a pushed-down conjunct that 
references one against the
+        // index (e.g. `__DORIS_VERSION_COL__ = <real version> AND indexed_col 
= ...`) would drop
+        // matching rows before read-time substitution, so leave the whole 
conjunct to the row-level
+        // path, which sees the substituted value.
+        {
+            std::set<int> expr_column_ids;
+            expr_ctx->root()->collect_slot_column_ids(expr_column_ids);

Review Comment:
   Fixed in ab54691. Added a shared helper 
`_expr_references_placeholder_column` that follows `get_virtual_column_expr()` 
the same way `_mark_common_expr_states` does, and routed both the common-expr 
conjunct loop and the virtual-projection loop in `_apply_index_expr` through 
it. Added a CSE regression (`enable_virtual_slot_for_cse=true` with a repeated 
`__DORIS_VERSION_COL__ = <version>` subexpression on the indexed table); it 
returns all rows.



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