You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by li...@apache.org on 2022/01/17 12:32:13 UTC
[incubator-doris] 32/33: [Vectorized][Bug] Fix bug of repeated node resize and compile failed (#7778)
This is an automated email from the ASF dual-hosted git repository.
lihaopeng pushed a commit to branch vectorized
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
commit b634ea62bbdef860a5bafffb078e6f128bfaaaff
Author: HappenLee <ha...@hotmail.com>
AuthorDate: Mon Jan 17 20:11:26 2022 +0800
[Vectorized][Bug] Fix bug of repeated node resize and compile failed (#7778)
Co-authored-by: lihaopeng <li...@baidu.com>
---
be/src/vec/exec/vrepeat_node.cpp | 13 ++++++-------
be/src/vec/functions/simple_function_factory.h | 2 +-
build.sh | 2 +-
3 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/be/src/vec/exec/vrepeat_node.cpp b/be/src/vec/exec/vrepeat_node.cpp
index dd8bb28..287aa6e 100644
--- a/be/src/vec/exec/vrepeat_node.cpp
+++ b/be/src/vec/exec/vrepeat_node.cpp
@@ -104,6 +104,7 @@ Status VRepeatNode::get_repeated_block(Block* child_block, int repeat_id_idx, Bl
std::set<SlotId>& repeat_ids = _slot_id_set_list[repeat_id_idx];
bool is_repeat_slot = _all_slot_ids.find(_output_slots[cur_col]->id()) != _all_slot_ids.end();
bool is_set_null_slot = repeat_ids.find(_output_slots[cur_col]->id()) == repeat_ids.end();
+ const auto column_size = src_column.column->size();
if (is_repeat_slot) {
DCHECK(_output_slots[cur_col]->is_nullable());
@@ -113,21 +114,19 @@ Status VRepeatNode::get_repeated_block(Block* child_block, int repeat_id_idx, Bl
// set slot null not in repeat_ids
if (is_set_null_slot) {
- nullable_column->resize(src_column.column->size());
- for (size_t j = 0; j < src_column.column->size(); ++j) {
- nullable_column->insert_data(nullptr, 0);
- }
+ nullable_column->resize(column_size);
+ memset(nullable_column->get_null_map_data().data(), 1, sizeof(UInt8) * column_size);
} else {
if (!src_column.type->is_nullable()) {
- for (size_t j = 0; j < src_column.column->size(); ++j) {
+ for (size_t j = 0; j < column_size; ++j) {
null_map.push_back(0);
}
column_ptr = &nullable_column->get_nested_column();
}
- column_ptr->insert_range_from(*src_column.column, 0, src_column.column->size());
+ column_ptr->insert_range_from(*src_column.column, 0, column_size);
}
} else {
- columns[cur_col]->insert_range_from(*src_column.column, 0, src_column.column->size());
+ columns[cur_col]->insert_range_from(*src_column.column, 0, column_size);
}
cur_col++;
}
diff --git a/be/src/vec/functions/simple_function_factory.h b/be/src/vec/functions/simple_function_factory.h
index 45420cb..5b9f0fd 100644
--- a/be/src/vec/functions/simple_function_factory.h
+++ b/be/src/vec/functions/simple_function_factory.h
@@ -66,7 +66,7 @@ void register_function_like(SimpleFunctionFactory& factory);
void register_function_regexp(SimpleFunctionFactory& factory);
void register_function_random(SimpleFunctionFactory& factory);
void register_function_coalesce(SimpleFunctionFactory& factory);
-+void register_function_grouping(SimpleFunctionFactory& factory);
+void register_function_grouping(SimpleFunctionFactory& factory);
class SimpleFunctionFactory {
using Creator = std::function<FunctionBuilderPtr()>;
diff --git a/build.sh b/build.sh
index d842b07..a5ccaae 100755
--- a/build.sh
+++ b/build.sh
@@ -104,7 +104,7 @@ fi
eval set -- "$OPTS"
-PARALLEL=$[$(nproc)+1]
+PARALLEL=$[$(nproc)/4+1]
BUILD_BE=
BUILD_FE=
BUILD_UI=
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org