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


##########
be/src/format/parquet/vparquet_reader.cpp:
##########
@@ -1648,11 +1653,22 @@ Status 
ParquetReader::_process_expr_zonemap_filter(const tparquet::RowGroup& row
         return Status::OK();
     }
 
+    // The v1 Parquet reader is being removed, so it does not take on the new 
slot-vs-slot pruning.
+    // Restrict this path to single-slot conjuncts, mirroring the page path's 
single-column
+    // requirement above; a two-slot shape falls back to no pruning here. 
Native and v2 keep it.
     std::set<int> column_ids;
+    VExprContextSPtrs single_slot_conjuncts;
     for (const auto& conjunct : all_conjuncts) {
-        if (conjunct->root() != nullptr && 
conjunct->root()->can_evaluate_zonemap_filter()) {
-            conjunct->root()->collect_slot_column_ids(column_ids);
+        if (conjunct->root() == nullptr || 
!conjunct->root()->can_evaluate_zonemap_filter()) {
+            continue;
+        }
+        std::set<int> conjunct_column_ids;
+        conjunct->root()->collect_slot_column_ids(conjunct_column_ids);
+        if (conjunct_column_ids.size() != 1) {

Review Comment:
   Fixed in 09e30703a76. Both v1 gates now walk the whole conjunct tree with 
`contains_slot_slot_comparison` and reject any slot-vs-slot leaf, including 
same-column `a < a` (one ordinal) and equal-ordinal leaves nested under AND/OR, 
instead of counting distinct ordinals. Added a unit test pinning the `a < a` 
case and a nested `x < 5 AND c < d` case.
   
   The width-unsafe v1 parse itself is a pre-existing v1 limitation; #68148 
would have fenced it but is closed now that v1 is being removed.



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