Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
garenshi committed Nov 29, 2024
1 parent a1357a4 commit fbc9fdf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions be/src/vec/core/block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,7 @@ void Block::check_number_of_rows(bool allow_null_columns) const {
size_t Block::rows() const {
for (const auto& elem : data) {
if (elem.column) {
if (elem.column->size()) {
return elem.column->size();
}
return elem.column->size();
}
}

Expand Down
5 changes: 2 additions & 3 deletions be/src/vec/exprs/lambda_function/varray_map_function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,9 @@ class ArrayMapFunction : public LambdaFunction {

MutableBlock m_lambda_block(&lambda_block);
MutableColumns& columns = m_lambda_block.mutable_columns();
int current_step = 0;
while (columns[gap]->size() < batch_size) {
int max_step = batch_size - columns[gap]->size();
current_step = std::min(max_step, (int)(args.cur_size - args.current_offset_in_array));
long max_step = batch_size - columns[gap]->size();
long current_step = std::min(max_step, (long)(args.cur_size - args.current_offset_in_array));
size_t pos = args.array_start + args.current_offset_in_array;
for (int i = 0; i < arguments.size(); ++i) {
columns[gap + i]->insert_range_from(*lambda_datas[i], pos, current_step);
Expand Down

0 comments on commit fbc9fdf

Please sign in to comment.