github-actions[bot] commented on code in PR #62956:
URL: https://github.com/apache/doris/pull/62956#discussion_r3165294015
##########
be/src/exec/operator/nested_loop_join_probe_operator.cpp:
##########
@@ -317,6 +585,17 @@ Status
NestedLoopJoinProbeLocalState::generate_inner_join_block_data(RuntimeStat
auto& p = _parent->cast<NestedLoopJoinProbeOperatorX>();
auto* probe_block = _child_block.get();
+ if (p._enable_lazy_materialize) {
+ if (!_matched_rows_done && !_need_more_input_data) {
+ if (use_generate_block_base_build()) {
+ RETURN_IF_ERROR(_generate_lazy_block_base_build(state,
probe_block));
+ } else {
+ RETURN_IF_ERROR(_generate_lazy_block_base_probe(state,
probe_block));
+ }
+ }
+ return Status::OK();
+ }
+
if (!_matched_rows_done && !_need_more_input_data) {
if (use_generate_block_base_build()) {
Review Comment:
This enables a new execution path that bypasses the existing full
materialization plus `_do_filtering_and_update_visited_flags()` flow for
inner/cross nested-loop joins, but the PR does not add any BE unit or
regression coverage for it. This is a kernel execution correctness change;
please add tests covering at least projection-pruned joins with non-equi join
conjuncts, all-slots-pruned cases such as `COUNT(*)`, and nullable columns so
the lazy placeholder/materialization logic is exercised.
##########
be/src/exec/operator/nested_loop_join_probe_operator.cpp:
##########
@@ -573,6 +857,22 @@ Status NestedLoopJoinProbeOperatorX::prepare(RuntimeState*
state) {
}
_num_probe_side_columns = _child->row_desc().num_materialized_slots();
_num_build_side_columns =
_build_side_child->row_desc().num_materialized_slots();
+ for (const auto& conjunct : _join_conjuncts) {
+ conjunct->root()->collect_slot_column_ids(_lazy_eval_column_ids);
+ }
+ if (_has_materialized_slot_ids) {
+ for (const auto slot_id : _materialized_slot_ids) {
+ const int column_id =
intermediate_row_desc().get_column_id(slot_id);
Review Comment:
This regresses the base behavior from resizing by
`_probe_side_process_count` to resizing by `1`. The nested nullable column
above inserts `_probe_side_process_count` probe rows, so when more than one row
is appended the `ColumnNullable` nested column and null map have different
sizes. That can crash or corrupt later block processing/serialization. Please
keep the null map size aligned with the inserted range.
```suggestion
.resize_fill(origin_sz + _probe_side_process_count, 0);
```
--
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]