-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Fix](bug) Percentile* func core when percent args is negative number #47068
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
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
|
run buildall |
|
run buildall |
|
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 32271 ms |
TPC-DS: Total hot run time: 193544 ms |
ClickBench: Total hot run time: 31.04 s |
|
run buildall |
TPC-H: Total hot run time: 32376 ms |
TPC-DS: Total hot run time: 187012 ms |
ClickBench: Total hot run time: 31.07 s |
|
TeamCity be ut coverage result: |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
|
|
||
| @Override | ||
| public void checkLegalityBeforeTypeCoercion() { | ||
| if (!getArgument(1).isConstant()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the limit is constant, can we also add the limit of not null and [0,1] value range?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now FE can't sure the const fold ready in FE, so union check in BE
…#47068) ### What problem does this PR solve? Fix Percentile* func core when percent args is negative number After the pr, can check the percent args is in [0,1], else throw exception ``` start BE in local mode *** Query id: cdf31a0f13d04a55-8b84a72628d5a8a0 *** *** is nereids: 1 *** *** tablet id: 0 *** *** Aborted at 1736941916 (unix time) try "date -d @1736941916" if you are using GNU date *** *** Current BE git commitID: 77031ac *** *** SIGSEGV address not mapped to object (@0x7fba49150840) received by PID 7647 (TID 10021 OR 0x7fb14659f640) from PID 1226115136; stack trace: *** 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/common/signal_handler.h:421 1# PosixSignals::chained_handler(int, siginfo*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 3# 0x00007FB26EB4E520 in /lib/x86_64-linux-gnu/libc.so.6 4# doris::Counts::terminate(double) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/util/counts.h:207 5# doris::vectorized::AggregateFunctionPercentileArray::insert_result_into(char const*, doris::vectorized::IColumn&) const at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/vec/aggregate_functions/aggregate_function_percentile.h:528 6# doris::pipeline::AggLocalState::_get_without_key_result(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/exec/aggregation_source_operator.cpp:385 7# std::_Function_handler, std::_Placeholder<2>, std::_Placeholder<3>))(doris::RuntimeState*, doris::vectorized::Block*, bool*)> >::_M_invoke(std::_Any_data const&, doris::RuntimeState*&&, doris::vectorized::Block*&&, bool*&&) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:291 8# doris::pipeline::AggSourceOperatorX::get_block(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/exec/aggregation_source_operator.cpp:438 9# doris::pipeline::OperatorXBase::get_block_after_projects(doris::RuntimeState*, doris::vectorized::Block*, bool*) in /mnt/hdd01/ci/doris-deploy-branch-3.0-local/be/lib/doris_be 10# doris::pipeline::PipelineTask::execute(bool*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/pipeline_task.cpp:376 11# doris::pipeline::TaskScheduler::_do_work(unsigned long) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/task_scheduler.cpp:138 12# doris::ThreadPool::dispatch_thread() in /mnt/hdd01/ci/doris-deploy-branch-3.0-local/be/lib/doris_be 13# doris::Thread::supervise_thread(void*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/util/thread.cpp:499 14# start_thread at ./nptl/pthread_create.c:442 15# 0x00007FB26EC32850 at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:83 172.20.48.199 last coredump sql: 2025-01-15 19:52:25,410 [query] Query cdf31a0f13d04a55-8b84a72628d5a8a0 1 times with new query id: 171586b2ada34e68-b90ec1fa65013f9f 2025-01-15 19:52:57,126 [query] Query cdf31a0f13d04a55-8b84a72628d5a8a0 2 times with new query id: a44ad498175f4b2d-b3eb8478dc70fa97 ```
…apache#47068) ### What problem does this PR solve? Fix Percentile* func core when percent args is negative number After the pr, can check the percent args is in [0,1], else throw exception ``` start BE in local mode *** Query id: cdf31a0f13d04a55-8b84a72628d5a8a0 *** *** is nereids: 1 *** *** tablet id: 0 *** *** Aborted at 1736941916 (unix time) try "date -d @1736941916" if you are using GNU date *** *** Current BE git commitID: 77031ac *** *** SIGSEGV address not mapped to object (@0x7fba49150840) received by PID 7647 (TID 10021 OR 0x7fb14659f640) from PID 1226115136; stack trace: *** 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/common/signal_handler.h:421 1# PosixSignals::chained_handler(int, siginfo*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so 3# 0x00007FB26EB4E520 in /lib/x86_64-linux-gnu/libc.so.6 4# doris::Counts::terminate(double) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/util/counts.h:207 5# doris::vectorized::AggregateFunctionPercentileArray::insert_result_into(char const*, doris::vectorized::IColumn&) const at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/vec/aggregate_functions/aggregate_function_percentile.h:528 6# doris::pipeline::AggLocalState::_get_without_key_result(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/exec/aggregation_source_operator.cpp:385 7# std::_Function_handler, std::_Placeholder<2>, std::_Placeholder<3>))(doris::RuntimeState*, doris::vectorized::Block*, bool*)> >::_M_invoke(std::_Any_data const&, doris::RuntimeState*&&, doris::vectorized::Block*&&, bool*&&) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:291 8# doris::pipeline::AggSourceOperatorX::get_block(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/exec/aggregation_source_operator.cpp:438 9# doris::pipeline::OperatorXBase::get_block_after_projects(doris::RuntimeState*, doris::vectorized::Block*, bool*) in /mnt/hdd01/ci/doris-deploy-branch-3.0-local/be/lib/doris_be 10# doris::pipeline::PipelineTask::execute(bool*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/pipeline_task.cpp:376 11# doris::pipeline::TaskScheduler::_do_work(unsigned long) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/pipeline/task_scheduler.cpp:138 12# doris::ThreadPool::dispatch_thread() in /mnt/hdd01/ci/doris-deploy-branch-3.0-local/be/lib/doris_be 13# doris::Thread::supervise_thread(void*) at /home/zcp/repo_center/doris_branch-3.0/doris/be/src/util/thread.cpp:499 14# start_thread at ./nptl/pthread_create.c:442 15# 0x00007FB26EC32850 at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:83 172.20.48.199 last coredump sql: 2025-01-15 19:52:25,410 [query] Query cdf31a0f13d04a55-8b84a72628d5a8a0 1 times with new query id: 171586b2ada34e68-b90ec1fa65013f9f 2025-01-15 19:52:57,126 [query] Query cdf31a0f13d04a55-8b84a72628d5a8a0 2 times with new query id: a44ad498175f4b2d-b3eb8478dc70fa97 ```
What problem does this PR solve?
Fix Percentile* func core when percent args is negative number
After the pr, can check the percent args is in [0,1], else throw exception
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)