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

[FIX](array_agg) fix array agg with other agg function #32387

Merged
merged 2 commits into from
Mar 19, 2024

Conversation

amorynan
Copy link
Contributor

Proposed changes

if we use array_agg func after other agg func like count, sum, here may make be core with core stack below

*** is nereids: 1 ***
*** tablet id: 0 ***
*** Aborted at 1710744527 (unix time) try "date -d @1710744527" if you are using GNU date ***
*** Current BE git commitID: b1cae7cc00 ***
*** SIGSEGV address not mapped to object (@0x1) received by PID 3108681 (TID 3127071 OR 0x7fd0ba580700) from PID 1; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /mnt/disk2/wangqiannan/amory/master/doris/be/src/common/signal_handler.h:421
 1# PosixSignals::chained_handler(int, siginfo*, void*) [clone .part.0] in /mnt/disk2/wangqiannan/tool/jdk-17.0.10/lib/server/libjvm.so
 2# JVM_handle_linux_signal in /mnt/disk2/wangqiannan/tool/jdk-17.0.10/lib/server/libjvm.so
 3# 0x00007FE05D36CB50 in /lib64/libc.so.6
 4# void doris::vectorized::PODArray<unsigned char, 4096ul, Allocator<false, false, false>, 15ul, 16ul>::push_back<unsigned char const&>(unsigned char const&) at /mnt/disk2/wangqiannan/amory/master/doris/be/src/vec/common/pod_array.h:385
 5# doris::vectorized::AggregateFunctionArrayAggData<doris::StringRef>::deserialize_and_merge(doris::vectorized::IColumn const&, unsigned long) at /mnt/disk2/wangqiannan/amory/master/doris/be/src/vec/aggregate_functions/aggregate_function_collect.h:398
 6# doris::vectorized::AggregateFunctionCollect<doris::vectorized::AggregateFunctionArrayAggData<doris::StringRef>, std::integral_constant<bool, false>, std::integral_constant<bool, true> >::deserialize_and_merge_vec(char* const*, unsigned long, char*, doris::vectorized::ColumnString const*, doris::vectorized::Arena*, unsigned long) const at /mnt/disk2/wangqiannan/amory/master/doris/be/src/vec/aggregate_functions/aggregate_function_collect.h:558
 7# doris::Status doris::vectorized::AggregationNode::_merge_with_serialized_key_helper<false, false>(doris::vectorized::Block*) at /mnt/disk2/wangqiannan/amory/master/doris/be/src/vec/exec/vaggregation_node.h:677
 8# doris::vectorized::AggregationNode::_merge_with_serialized_key(doris::vectorized::Block*) in /mnt/disk2/wangqiannan/amory/master/doris/output/be/lib/doris_be
 9# doris::Status std::__invoke_impl<doris::Status, doris::Status (doris::vectorized::AggregationNode::*&)(doris::vectorized::Block*), doris::vectorized::AggregationNode*&, doris::vectorized::Block*>(std::__invoke_memfun_deref, doris::Status (doris::vectorized::AggregationNode::*&)(doris::vectorized::Block*), doris::vectorized::AggregationNode*&, doris::vectorized::Block*&&) at /mnt/disk2/wangqiannan/tool/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:74
10# std::enable_if<is_invocable_r_v<doris::Status, doris::Status (doris::vectorized::AggregationNode::*&)(doris::vectorized::Block*), doris::vectorized::AggregationNode*&, doris::vectorized::Block*>, doris::Status>::type std::__invoke_r<doris::Status, doris::Status (doris::vectorized::AggregationNode::*&)(doris::vectorized::Block*), doris::vectorized::AggregationNode*&, doris::vectorized::Block*>(doris::Status (doris::vectorized::AggregationNode::*&)(doris::vectorized::Block*), doris::vectorized::AggregationNode*&, doris::vectorized::Block*&&) at /mnt/disk2/wangqiannan/tool/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:114
11# doris::Status std::_Bind_result<doris::Status, doris::Status (doris::vectorized::AggregationNode::*(doris::vectorized::AggregationNode*, std::_Placeholder<1>))(doris::vectorized::Block*)>::__call<doris::Status, doris::vectorized::Block*&&, 0ul, 1ul>(std::tuple<doris::vectorized::Block*&&>&&, std::_Index_tuple<0ul, 1ul>) at /mnt/disk2/wangqiannan/tool/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/functional:570
12# doris::Status std::_Bind_result<doris::Status, doris::Status (doris::vectorized::AggregationNode::*(doris::vectorized::AggregationNode*, std::_Placeholder<1>))(doris::vectorized::Block*)>::operator()<doris::vectorized::Block*>(doris::vectorized::Block*&&) at /mnt/disk2/wangqiannan/tool/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/functional:629
13# doris::Status std::__invoke_impl<doris::Status, std::_Bind_result<doris::Status, doris::Status (doris::vectorized::AggregationNode::*(doris::vectorized::AggregationNode*, std::_Placeholder<1>))(doris::vectorized::Block*)>&, doris::vectorized::Block*>(std::__invoke_other, std::_Bind_result<doris::Status, doris::Status (doris::vectorized::AggregationNode::*(doris::vectorized::AggregationNode*, std::_Placeholder<1>))(doris::vectorized::Block*)>&, doris::vectorized::Block*&&) at /mnt/disk2/wangqiannan/tool/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:61
14# std::enable_if<is_invocable_r_v<doris::Status, std::_Bind_result<doris::Status, doris::Status (doris::vectorized::AggregationNode::*(doris::vectorized::AggregationNode*, std::_Placeholder<1>))(doris::vectorized::Block*)>&, doris::vectorized::Block*>, doris::Status>::type std::__invoke_r<doris::Status, std::_Bind_result<doris::Status, doris::Status (doris::vectorized::AggregationNode::*(doris::vectorized::AggregationNode*, std::_Placeholder<1>))(doris::vectorized::Block*)>&, doris::vectorized::Block*>(std::_Bind_result<doris::Status, doris::Status (doris::vectorized::AggregationNode::*(doris::vectorized::AggregationNode*, std::_Placeholder<1>))(doris::vectorized::Block*)>&, doris::vectorized::Block*&&) at /mnt/disk2/wangqiannan/tool/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:114
15# std::_Function_handler<doris::Status (doris::vectorized::Block*), std::_Bind_result<doris::Status, doris::Status (doris::vectorized::AggregationNode::*(doris::vectorized::AggregationNode*, std::_Placeholder<1>))(doris::vectorized::Block*)> >::_M_invoke(std::_Any_data const&, doris::vectorized::Block*&&) at /mnt/disk2/wangqiannan/tool/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:291
16# std::function<doris::Status (doris::vectorized::Block*)>::operator()(doris::vectorized::Block*) const at /mnt/disk2/wangqiannan/tool/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:560
17# doris::vectorized::AggregationNode::sink(doris::RuntimeState*, doris::vectorized::Block*, bool) at /mnt/disk2/wangqiannan/amory/master/doris/be/src/vec/exec/vaggregation_node.cpp:506
18# doris::pipeline::StreamingOperator<doris::vectorized::AggregationNode>::sink(doris::RuntimeState*, doris::vectorized::Block*, doris::pipeline::SourceState) at /mnt/disk2/wangqiannan/amory/master/doris/be/src/pipeline/exec/operator.h:334
19# doris::pipeline::PipelineTask::execute(bool*) at /mnt/disk2/wangqiannan/amory/master/doris/be/src/pipeline/pipeline_task.cpp:304
20# doris::pipeline::TaskScheduler::_do_work(unsigned long) at /mnt/disk2/wangqiannan/amory/master/doris/be/src/pipeline/task_scheduler.cpp:334
21# doris::pipeline::TaskScheduler::start()::$_0::operator()() const at /mnt/disk2/wangqiannan/amory/master/doris/be/src/pipeline/task_scheduler.cpp:218

Issue Number: close #xxx

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

@amorynan
Copy link
Contributor Author

run buildall

mrhhsg
mrhhsg previously approved these changes Mar 18, 2024
Copy link
Member

@mrhhsg mrhhsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Mar 18, 2024
Copy link
Contributor

PR approved by at least one committer and no changes requested.

Copy link
Contributor

PR approved by anyone and no changes requested.

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@cambyzju
Copy link
Contributor

Does 2.0 has the same problem?

@amorynan
Copy link
Contributor Author

Does 2.0 has the same problem?

No, array_agg is not pick for 2.0, and coming from 2.1

cambyzju
cambyzju previously approved these changes Mar 18, 2024
Copy link
Contributor

@cambyzju cambyzju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wm1581066 wm1581066 added the not-merge/2.0 do not merge into 2.0 branch label Mar 18, 2024
@yiguolei yiguolei added the usercase Important user case type label label Mar 18, 2024
@xingyingone
Copy link
Contributor

LGTM

Copy link
Contributor

@xingyingone xingyingone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yiguolei
Copy link
Contributor

run performance

yiguolei
yiguolei previously approved these changes Mar 18, 2024
@amorynan amorynan dismissed stale reviews from yiguolei, cambyzju, and mrhhsg via 69c9f1a March 19, 2024 02:19
@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Mar 19, 2024
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@amorynan
Copy link
Contributor Author

run buildall

Copy link
Member

@mrhhsg mrhhsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Mar 19, 2024
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@BiteTheDDDDt BiteTheDDDDt merged commit 1fffd33 into apache:master Mar 19, 2024
27 of 31 checks passed
XuJianxu pushed a commit to XuJianxu/doris that referenced this pull request Mar 19, 2024
yiguolei pushed a commit that referenced this pull request Mar 21, 2024
yiguolei pushed a commit that referenced this pull request Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. not-merge/2.0 do not merge into 2.0 branch reviewed usercase Important user case type label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants