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


##########
be/src/format_v2/parquet/reader/native_column_reader.cpp:
##########
@@ -387,7 +392,7 @@ Status NativeColumnReader::read_with_filter(int64_t rows, 
const uint8_t* filter_
     RETURN_IF_ERROR(filter.init(filter_data, static_cast<size_t>(rows), 
filter_all));
     _native_reader->reset_filter_map_index();
     const bool materialize_variant =
-            !dictionary_ids && _variant_plan->contains_variant && 
output_type->equals(*_type);
+            !dictionary_ids && _variant_plan != nullptr && 
output_type->equals(*_type);

Review Comment:
   [P2] Keep the Variant gate projection-sensitive
   
   `contains_variant` describes the complete schema subtree, not the selected 
projection. For a reachable `STRUCT<label, info VARIANT>` scan that projects 
only `label`, `build_variant_plan()` follows the projection and returns 
`contains_variant == false`, but the plan pointer is still non-null. This check 
therefore sends every read/select and accumulated lazy-skip batch through 
`_variant_physical_column`, recursive wrapper transformation/shape validation, 
and replacement scratch allocation even though no Variant node was requested; 
the base path decoded directly because it checked the plan's content. Please 
discard a plan whose `contains_variant` is false (or preserve the 
content-sensitive gates), and cover a Variant-excluding partial projection.



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