Skip to content

Conversation

@wyxxxcat
Copy link
Contributor

@wyxxxcat wyxxxcat commented Aug 5, 2024

cherry-pick #34258 to branch-2.1

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@wyxxxcat wyxxxcat force-pushed the auto_partition_name branch 2 times, most recently from 5db4f78 to 8662732 Compare August 5, 2024 03:30
@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2024

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

@wyxxxcat wyxxxcat force-pushed the auto_partition_name branch from 8662732 to e53d6a2 Compare August 5, 2024 03:33
@wyxxxcat
Copy link
Contributor Author

wyxxxcat commented Aug 5, 2024

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2024

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

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2024

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

@wyxxxcat wyxxxcat changed the title [Enhancement] (doris-future) Support auto partition name function [branch-2.1] (doris-future) Support auto partition name function Aug 5, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2024

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

@wyxxxcat wyxxxcat force-pushed the auto_partition_name branch from e53d6a2 to 93fc121 Compare August 5, 2024 03:44
@wyxxxcat wyxxxcat force-pushed the auto_partition_name branch from 93fc121 to c0a511f Compare August 5, 2024 03:46
@wyxxxcat
Copy link
Contributor Author

wyxxxcat commented Aug 5, 2024

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.41% (9268/25458)
Line Coverage: 27.93% (75795/271418)
Region Coverage: 26.78% (38992/145613)
Branch Coverage: 23.50% (19789/84220)
Coverage Report: http://coverage.selectdb-in.cc/coverage/c0a511f62e4ef91b7acfc1348483442f20edb705_c0a511f62e4ef91b7acfc1348483442f20edb705/report/index.html

@yiguolei yiguolei merged commit 65154f8 into apache:branch-2.1 Aug 5, 2024
yiguolei pushed a commit that referenced this pull request Sep 15, 2025
…planner (#55464)

### What problem does this PR solve?

**Problem:**
Incorrect input arguments for auto_partition_name cause a fallback to
the legacy planner in branch 2.1. However, since this function is
handled by the FE legacy code, there is no parameter checking logic.
(See: #38853)

Furthermore, there is a lack of sufficient checks on the BE side, which
can lead to crashes. Such as:
```
select auto_partition_name("xxx");
select auto_partition_name("xxx", "sss");
```

**How to Fix:**
So here we simply remove function `auto_partition_name` in legacy
planner


**The stack is like:**
```
*** Query id: 24c69ac956394483-b2a4d08963d06593 ***
*** is nereids: 0 ***
*** tablet id: 0 ***
*** Aborted at 1756449846 (unix time) try "date -d @1756449846" if you are using GNU date ***
*** Current BE git commitID: 2506121 ***
*** SIGSEGV address not mapped to object (@0x0) received by PID 1010328 (TID 1011344 OR 0x7f75ba07a6c0) from PID 0; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) in /usr/local/service/doris/lib/be/doris_be
 1# os::Linux::chained_handler(int, siginfo*, void*) in /usr/local/jdk/jre/lib/amd64/server/libjvm.so
 2# JVM_handle_linux_signal in /usr/local/jdk/jre/lib/amd64/server/libjvm.so
 3# signalHandler(int, siginfo*, void*) in /usr/local/jdk/jre/lib/amd64/server/libjvm.so
 4# 0x00007F77D0EA1AD0 in /lib64/libc.so.6
 5# doris::vectorized::PreparedFunctionImpl::default_implementation_for_constant_arguments(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool, bool*) const in /usr/local/service/doris/lib/be/doris_be
 6# 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 in /usr/local/service/doris/lib/be/doris_be
 7# doris::vectorized::PreparedFunctionImpl::execute(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool) const in /usr/local/service/doris/lib/be/doris_be
 8# doris::vectorized::IFunctionBase::execute(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned long, std::allocator<unsigned long> > const&, unsigned long, unsigned long, bool) const in /usr/local/service/doris/lib/be/doris_be
 9# doris::vectorized::VectorizedFnCall::_do_execute(doris::vectorized::VExprContext*, doris::vectorized::Block*, int*, std::vector<unsigned long, std::allocator<unsigned long> >&) in /usr/local/service/doris/lib/be/doris_be
10# doris::vectorized::VectorizedFnCall::execute(doris::vectorized::VExprContext*, doris::vectorized::Block*, int*) in /usr/local/service/doris/lib/be/doris_be
11# doris::vectorized::VExpr::get_const_col(doris::vectorized::VExprContext*, std::shared_ptr<doris::ColumnPtrWrapper>*) in /usr/local/service/doris/lib/be/doris_be
12# doris::vectorized::VectorizedFnCall::open(doris::RuntimeState*, doris::vectorized::VExprContext*, doris::FunctionContext::FunctionStateScope) in /usr/local/service/doris/lib/be/doris_be
13# doris::vectorized::VExprContext::open(doris::RuntimeState*) in /usr/local/service/doris/lib/be/doris_be
14# doris::vectorized::VExpr::open(std::vector<std::shared_ptr<doris::vectorized::VExprContext>, std::allocator<std::shared_ptr<doris::vectorized::VExprContext> > > const&, doris::RuntimeState*) in /usr/local/service/doris/lib/be/doris_be
15# doris::pipeline::UnionSourceOperatorX::open(doris::RuntimeState*) in /usr/local/service/doris/lib/be/doris_be
16# doris::pipeline::Pipeline::prepare(doris::RuntimeState*) in /usr/local/service/doris/lib/be/doris_be
17# doris::pipeline::PipelineXFragmentContext::prepare(doris::TPipelineFragmentParams const&, doris::ThreadPool*) in /usr/local/service/doris/lib/be/doris_be
18# doris::FragmentMgr::exec_plan_fragment(doris::TPipelineFragmentParams const&, doris::QuerySource, std::function<void (doris::RuntimeState*, doris::Status*)> const&) in /usr/local/service/doris/lib/be/doris_be
19# doris::FragmentMgr::exec_plan_fragment(doris::TPipelineFragmentParams const&, doris::QuerySource) in /usr/local/service/doris/lib/be/doris_be
```

### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [ ] 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 <!-- Add your reason?  -->

- Behavior changed:
    - [ ] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants