Skip to content

Commit

Permalink
[BugFix] Fix array map over flow (#55966)
Browse files Browse the repository at this point in the history
Signed-off-by: before-Sunrise <[email protected]>
  • Loading branch information
before-Sunrise authored Feb 18, 2025
1 parent 64d0f20 commit cd1f63c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions be/src/exprs/array_map_expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ StatusOr<ColumnPtr> ArrayMapExpr::evaluate_lambda_expr(ExprContext* context, Chu
tmp_col->check_or_die();
ASSIGN_OR_RETURN(column, tmp_col->replicate(aligned_offsets->get_data()));
column = ColumnHelper::align_return_type(column, type().children[0], column->size(), true);

RETURN_IF_ERROR(column->capacity_limit_reached());
} else {
// if all input arguments are constant and lambda expr doesn't rely on other capture columns,
// we can evaluate it based on const column
Expand Down Expand Up @@ -225,6 +227,7 @@ StatusOr<ColumnPtr> ArrayMapExpr::evaluate_lambda_expr(ExprContext* context, Chu
}
}
}

DCHECK(column != nullptr);
column = ColumnHelper::cast_to_nullable_column(column);

Expand Down

0 comments on commit cd1f63c

Please sign in to comment.