Skip to content

[fix](function) The parameters after the first of the mask function need to be restricted to constants#45348

Merged
HappenLee merged 1 commit intoapache:masterfrom
mrhhsg:fix_mask
Dec 17, 2024
Merged

[fix](function) The parameters after the first of the mask function need to be restricted to constants#45348
HappenLee merged 1 commit intoapache:masterfrom
mrhhsg:fix_mask

Conversation

@mrhhsg
Copy link
Member

@mrhhsg mrhhsg commented Dec 12, 2024

What problem does this PR solve?

*** Query id: 88218e14284c497a-b1a04172e7b896b6 ***
*** is nereids: 1 ***
*** tablet id: 0 ***
*** Aborted at 1733912200 (unix time) try "date -d @1733912200" if you are using GNU date ***
*** Current BE git commitID: 17bcc208e9 ***
*** SIGSEGV invalid permissions for mapped object (@0x7f04d94a0000) received by PID 6347 (TID 8285 OR 0x7f05c4996640) from PID 18446744073060089856; stack trace: ***
terminate called after throwing an instance of 'terminate called recursively
std::system_error'
  what():  Invalid argument
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /home/zcp/repo_center/doris_branch-2.1/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# 0x00007F09BFC91520 in /lib/x86_64-linux-gnu/libc.so.6
 4# doris::vectorized::FunctionMask::vector_mask(doris::vectorized::ColumnStr<unsigned int> const&, doris::vectorized::ColumnStr<unsigned int>&, char, char, char) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function_string.h:986
 5# doris::vectorized::FunctionMask::execute_impl(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long) const in /mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be
 6# doris::vectorized::DefaultExecutable::execute_impl(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function.h:461
 7# doris::vectorized::PreparedFunctionImpl::_execute_skipped_constant_deal(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function.cpp:122
 8# doris::vectorized::PreparedFunctionImpl::default_implementation_for_nulls(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool, bool*) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function.cpp:217
 9# doris::vectorized::PreparedFunctionImpl::execute_without_low_cardinality_columns(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function.cpp:244
10# doris::vectorized::PreparedFunctionImpl::execute(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function.cpp:250
11# doris::vectorized::IFunctionBase::execute(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function.h:194
12# doris::vectorized::VectorizedFnCall::_do_execute(doris::vectorized::VExprContext*, doris::vectorized::Block*, int*, std::vector<unsigned long, std::allocator<unsigned long> >&) in /mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be
13# doris::vectorized::VectorizedFnCall::execute(doris::vectorized::VExprContext*, doris::vectorized::Block*, int*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exprs/vectorized_fn_call.cpp:196
14# doris::vectorized::VExprContext::execute(doris::vectorized::Block*, int*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exprs/vexpr_context.cpp:54
15# doris::pipeline::OperatorXBase::do_projections(doris::RuntimeState*, doris::vectorized::Block*, doris::vectorized::Block*) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/pipeline/pipeline_x/operator.cpp:259
16# doris::pipeline::OperatorXBase::get_block_after_projects(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/pipeline/pipeline_x/operator.cpp:290
17# doris::pipeline::PipelineXTask::execute(bool*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/pipeline/pipeline_x/pipeline_x_task.cpp:346
18# doris::pipeline::TaskScheduler::_do_work(unsigned long) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/pipeline/task_scheduler.cpp:347
19# doris::ThreadPool::dispatch_thread() in /mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be
20# doris::Thread::supervise_thread(void*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/util/thread.cpp:499
21# start_thread at ./nptl/pthread_create.c:442
22# 0x00007F09BFD75850 at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:83

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@mrhhsg
Copy link
Member Author

mrhhsg commented Dec 12, 2024

run buildall

@github-actions
Copy link
Contributor

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

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 38.75% (10104/26075)
Line Coverage: 29.69% (84772/285549)
Region Coverage: 28.74% (43503/151346)
Branch Coverage: 25.30% (22095/87340)
Coverage Report: http://coverage.selectdb-in.cc/coverage/bbc5ba37fe8b490901d0e9b74feb81ca19e57aea_bbc5ba37fe8b490901d0e9b74feb81ca19e57aea/report/index.html

Copy link
Contributor

@yiguolei yiguolei 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 Dec 17, 2024
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@HappenLee HappenLee merged commit d0d726e into apache:master Dec 17, 2024
github-actions bot pushed a commit that referenced this pull request Dec 17, 2024
…eed to be restricted to constants (#45348)

```
*** Query id: 88218e14284c497a-b1a04172e7b896b6 ***
*** is nereids: 1 ***
*** tablet id: 0 ***
*** Aborted at 1733912200 (unix time) try "date -d @1733912200" if you are using GNU date ***
*** Current BE git commitID: 17bcc20 ***
*** SIGSEGV invalid permissions for mapped object (@0x7f04d94a0000) received by PID 6347 (TID 8285 OR 0x7f05c4996640) from PID 18446744073060089856; stack trace: ***
terminate called after throwing an instance of 'terminate called recursively
std::system_error'
  what():  Invalid argument
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /home/zcp/repo_center/doris_branch-2.1/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# 0x00007F09BFC91520 in /lib/x86_64-linux-gnu/libc.so.6
 4# doris::vectorized::FunctionMask::vector_mask(doris::vectorized::ColumnStr<unsigned int> const&, doris::vectorized::ColumnStr<unsigned int>&, char, char, char) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function_string.h:986
 5# doris::vectorized::FunctionMask::execute_impl(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long) const in /mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be
 6# doris::vectorized::DefaultExecutable::execute_impl(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function.h:461
 7# doris::vectorized::PreparedFunctionImpl::_execute_skipped_constant_deal(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function.cpp:122
 8# doris::vectorized::PreparedFunctionImpl::default_implementation_for_nulls(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool, bool*) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function.cpp:217
 9# doris::vectorized::PreparedFunctionImpl::execute_without_low_cardinality_columns(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function.cpp:244
10# doris::vectorized::PreparedFunctionImpl::execute(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function.cpp:250
11# doris::vectorized::IFunctionBase::execute(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function.h:194
12# doris::vectorized::VectorizedFnCall::_do_execute(doris::vectorized::VExprContext*, doris::vectorized::Block*, int*, std::vector<unsigned long, std::allocator<unsigned long> >&) in /mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be
13# doris::vectorized::VectorizedFnCall::execute(doris::vectorized::VExprContext*, doris::vectorized::Block*, int*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exprs/vectorized_fn_call.cpp:196
14# doris::vectorized::VExprContext::execute(doris::vectorized::Block*, int*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exprs/vexpr_context.cpp:54
15# doris::pipeline::OperatorXBase::do_projections(doris::RuntimeState*, doris::vectorized::Block*, doris::vectorized::Block*) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/pipeline/pipeline_x/operator.cpp:259
16# doris::pipeline::OperatorXBase::get_block_after_projects(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/pipeline/pipeline_x/operator.cpp:290
17# doris::pipeline::PipelineXTask::execute(bool*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/pipeline/pipeline_x/pipeline_x_task.cpp:346
18# doris::pipeline::TaskScheduler::_do_work(unsigned long) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/pipeline/task_scheduler.cpp:347
19# doris::ThreadPool::dispatch_thread() in /mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be
20# doris::Thread::supervise_thread(void*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/util/thread.cpp:499
21# start_thread at ./nptl/pthread_create.c:442
22# 0x00007F09BFD75850 at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:83
```
github-actions bot pushed a commit that referenced this pull request Dec 17, 2024
…eed to be restricted to constants (#45348)

```
*** Query id: 88218e14284c497a-b1a04172e7b896b6 ***
*** is nereids: 1 ***
*** tablet id: 0 ***
*** Aborted at 1733912200 (unix time) try "date -d @1733912200" if you are using GNU date ***
*** Current BE git commitID: 17bcc20 ***
*** SIGSEGV invalid permissions for mapped object (@0x7f04d94a0000) received by PID 6347 (TID 8285 OR 0x7f05c4996640) from PID 18446744073060089856; stack trace: ***
terminate called after throwing an instance of 'terminate called recursively
std::system_error'
  what():  Invalid argument
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /home/zcp/repo_center/doris_branch-2.1/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# 0x00007F09BFC91520 in /lib/x86_64-linux-gnu/libc.so.6
 4# doris::vectorized::FunctionMask::vector_mask(doris::vectorized::ColumnStr<unsigned int> const&, doris::vectorized::ColumnStr<unsigned int>&, char, char, char) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function_string.h:986
 5# doris::vectorized::FunctionMask::execute_impl(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long) const in /mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be
 6# doris::vectorized::DefaultExecutable::execute_impl(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function.h:461
 7# doris::vectorized::PreparedFunctionImpl::_execute_skipped_constant_deal(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function.cpp:122
 8# doris::vectorized::PreparedFunctionImpl::default_implementation_for_nulls(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool, bool*) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function.cpp:217
 9# doris::vectorized::PreparedFunctionImpl::execute_without_low_cardinality_columns(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function.cpp:244
10# doris::vectorized::PreparedFunctionImpl::execute(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function.cpp:250
11# doris::vectorized::IFunctionBase::execute(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/functions/function.h:194
12# doris::vectorized::VectorizedFnCall::_do_execute(doris::vectorized::VExprContext*, doris::vectorized::Block*, int*, std::vector<unsigned long, std::allocator<unsigned long> >&) in /mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be
13# doris::vectorized::VectorizedFnCall::execute(doris::vectorized::VExprContext*, doris::vectorized::Block*, int*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exprs/vectorized_fn_call.cpp:196
14# doris::vectorized::VExprContext::execute(doris::vectorized::Block*, int*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exprs/vexpr_context.cpp:54
15# doris::pipeline::OperatorXBase::do_projections(doris::RuntimeState*, doris::vectorized::Block*, doris::vectorized::Block*) const at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/pipeline/pipeline_x/operator.cpp:259
16# doris::pipeline::OperatorXBase::get_block_after_projects(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/pipeline/pipeline_x/operator.cpp:290
17# doris::pipeline::PipelineXTask::execute(bool*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/pipeline/pipeline_x/pipeline_x_task.cpp:346
18# doris::pipeline::TaskScheduler::_do_work(unsigned long) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/pipeline/task_scheduler.cpp:347
19# doris::ThreadPool::dispatch_thread() in /mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be
20# doris::Thread::supervise_thread(void*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/util/thread.cpp:499
21# start_thread at ./nptl/pthread_create.c:442
22# 0x00007F09BFD75850 at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:83
```
yiguolei pushed a commit that referenced this pull request Dec 17, 2024
…k function need to be restricted to constants #45348 (#45498)

Cherry-picked from #45348

Co-authored-by: Jerry Hu <hushenggang@selectdb.com>
yiguolei pushed a commit that referenced this pull request Dec 17, 2024
…k function need to be restricted to constants #45348 (#45497)

Cherry-picked from #45348

Co-authored-by: Jerry Hu <hushenggang@selectdb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants