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

[BugFix] One-staged aggrregation's having predicates should not applied to pre-cache aggregate operator (backport #43803) #43823

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

satanson
Copy link
Contributor

@satanson satanson commented Apr 10, 2024

Why I'm doing:

If current AggregateBlockSourceOperator is a pre-cache operator, the output format of aggregation columns
is binary column(for an example: multi_count_distinct) generated by AggregationFunction::serialize_column, having predicates applying to this intermediate format cause BE's crash.

The crash stack backtrace as follows:

*** Aborted at 1712672237 (unix time) try "date -d @1712672237" if you are using GNU date ***
PC: @          0x39c1538 starrocks::UnpackConstColumnBinaryFunction<>::evaluate<>()
*** SIGSEGV (@0x0) received by PID 1650236 (TID 0x7fd6c9ff9640) from PID 0; stack trace: ***
    @          0x5fa5742 google::(anonymous namespace)::FailureSignalHandler()
    @     0x7fd722195520 (unknown)
    @          0x39c1538 starrocks::UnpackConstColumnBinaryFunction<>::evaluate<>()
    @          0x39c180c starrocks::VectorizedBinaryPredicate<>::evaluate_checked()
    @          0x40c0e4e starrocks::VectorizedOrCompoundPredicate::evaluate_checked()
    @          0x40c0e4e starrocks::VectorizedOrCompoundPredicate::evaluate_checked()
    @          0x40c0e4e starrocks::VectorizedOrCompoundPredicate::evaluate_checked()
    @          0x385daa3 starrocks::ExprContext::evaluate()
    @          0x385ddef starrocks::ExprContext::evaluate()
    @          0x28d3432 starrocks::ExecNode::eval_conjuncts()
    @          0x28bf6ff starrocks::pipeline::Operator::eval_conjuncts_and_in_filters()
    @          0x2bfa677 starrocks::pipeline::AggregateBlockingSourceOperator::pull_chunk()
    @          0x2c53915 starrocks::query_cache::ConjugateOperator::pull_chunk()
    @          0x28aa8bc starrocks::query_cache::MultilaneOperator::_pull_chunk_from_lane()
    @          0x28aae25 starrocks::query_cache::MultilaneOperator::pull_chunk()
    @          0x2891f64 starrocks::pipeline::PipelineDriver::process()
    @          0x550125e starrocks::pipeline::GlobalDriverExecutor::_worker_thread()
    @          0x4db08fa starrocks::ThreadPool::dispatch_thread()
    @          0x4dab38a starrocks::Thread::supervise_thread()
    @     0x7fd7221e7ac3 (unknown)
    @     0x7fd722279850 (unknown)
    @                0x0 (unknown)

What I'm doing:

Having predicates should not be applied to the partial and incomplete result.

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.3
    • 3.2
    • 3.1
    • 3.0
    • 2.5

This is an automatic backport of pull request #43803 done by [Mergify](https://mergify.com). ## Why I'm doing: If current AggregateBlockSourceOperator is a pre-cache operator, the output format of aggregation columns is binary column(for an example: multi_count_distinct) generated by AggregationFunction::serialize_column, having predicates applying to this intermediate format cause BE's crash.

The crash stack backtrace as follows:

*** Aborted at 1712672237 (unix time) try "date -d @1712672237" if you are using GNU date ***
PC: @          0x39c1538 starrocks::UnpackConstColumnBinaryFunction<>::evaluate<>()
*** SIGSEGV (@0x0) received by PID 1650236 (TID 0x7fd6c9ff9640) from PID 0; stack trace: ***
    @          0x5fa5742 google::(anonymous namespace)::FailureSignalHandler()
    @     0x7fd722195520 (unknown)
    @          0x39c1538 starrocks::UnpackConstColumnBinaryFunction<>::evaluate<>()
    @          0x39c180c starrocks::VectorizedBinaryPredicate<>::evaluate_checked()
    @          0x40c0e4e starrocks::VectorizedOrCompoundPredicate::evaluate_checked()
    @          0x40c0e4e starrocks::VectorizedOrCompoundPredicate::evaluate_checked()
    @          0x40c0e4e starrocks::VectorizedOrCompoundPredicate::evaluate_checked()
    @          0x385daa3 starrocks::ExprContext::evaluate()
    @          0x385ddef starrocks::ExprContext::evaluate()
    @          0x28d3432 starrocks::ExecNode::eval_conjuncts()
    @          0x28bf6ff starrocks::pipeline::Operator::eval_conjuncts_and_in_filters()
    @          0x2bfa677 starrocks::pipeline::AggregateBlockingSourceOperator::pull_chunk()
    @          0x2c53915 starrocks::query_cache::ConjugateOperator::pull_chunk()
    @          0x28aa8bc starrocks::query_cache::MultilaneOperator::_pull_chunk_from_lane()
    @          0x28aae25 starrocks::query_cache::MultilaneOperator::pull_chunk()
    @          0x2891f64 starrocks::pipeline::PipelineDriver::process()
    @          0x550125e starrocks::pipeline::GlobalDriverExecutor::_worker_thread()
    @          0x4db08fa starrocks::ThreadPool::dispatch_thread()
    @          0x4dab38a starrocks::Thread::supervise_thread()
    @     0x7fd7221e7ac3 (unknown)
    @     0x7fd722279850 (unknown)
    @                0x0 (unknown)

What I'm doing:

Having predicates should not be applied to the partial and incomplete result.

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

…ed to pre-cache aggregate operator (#43803)

Signed-off-by: satanson <ranpanf@gmail.com>
(cherry picked from commit 771fcb2)
Signed-off-by: satanson <ranpanf@gmail.com>
@satanson satanson changed the title [BugFix] One-staged aggrregation's having predicates should not applied to pre-cache aggregate operator (#43803) [BugFix] One-staged aggrregation's having predicates should not applied to pre-cache aggregate operator (backport #43803) Apr 10, 2024
@wanpengfei-git wanpengfei-git enabled auto-merge (squash) April 10, 2024 03:08
@wanpengfei-git wanpengfei-git merged commit 8f03baa into branch-2.5 Apr 10, 2024
44 of 47 checks passed
@wanpengfei-git wanpengfei-git deleted the mergify/bp/branch-2.5/pr-43803 branch April 10, 2024 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants