Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comment out step 4 in array_map_expr #52598

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions be/src/exprs/array_map_expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,21 +140,9 @@ StatusOr<ColumnPtr> ArrayMapExpr::evaluate_lambda_expr(ExprContext* context, Chu
DCHECK(aligned_offsets != nullptr);

// 4. prepare outer common exprs
for (const auto& [slot_id, expr] : _outer_common_exprs) {
auto column = chunk->get_column_by_slot_id(slot_id);
column = ColumnHelper::unpack_and_duplicate_const_column(column->size(), column);
if constexpr (independent_lambda_expr) {
// if lambda expr doesn't rely on arguments, we don't need to align offset
cur_chunk->append_column(column, slot_id);
} else {
if (column->is_array()) {
auto view_column = ArrayViewColumn::from_array_column(column);
cur_chunk->append_column(view_column->replicate(aligned_offsets->get_data()), slot_id);
} else {
cur_chunk->append_column(column->replicate(aligned_offsets->get_data()), slot_id);
}
}
}
// we have already evaluated _outer_common_exprs in step 1
// we don't need to add columns referenced in _outer_common_exprs again here.
// it does not seems to be necessary to add all referenced columns here again

// 5. prepare capture columns
for (auto slot_id : capture_slot_ids) {
Expand Down
Loading