Skip to content

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #60563

…eptions (#60563)

This pull request replaces many `DCHECK` assertions with explicit error
handling throughout the runtime filter codebase. The changes improve
robustness by converting failed internal assumptions into meaningful
error statuses or exceptions, which helps prevent silent failures and
makes debugging easier.

Error handling improvements for runtime filter logic:

* Replaced `DCHECK` assertions with status checks and error returns for
null pointers, invalid states, and filter type mismatches in
`runtime_filter.cpp`, `runtime_filter.h`, `runtime_filter_consumer.cpp`,
`runtime_filter_mgr.cpp`, and `runtime_filter_producer.cpp`. This
includes checks for serialization data, filter dependencies, and filter
merge conditions.
[[1]](diffhunk://#diff-f505841d01d9ca521e7c6780854dff8251e0ca047a0f03185f5e85bce4a6c181L65-R69)
[[2]](diffhunk://#diff-54fe6a4b716938b750ec08983ee9ea7c9c390ffc8a796f361fd6354c3cb3a8c2L73-R77)
[[3]](diffhunk://#diff-54fe6a4b716938b750ec08983ee9ea7c9c390ffc8a796f361fd6354c3cb3a8c2L92-R101)
[[4]](diffhunk://#diff-de54918fd984e65b76a54152ed551c23348819b572d4253d577d6c9650bc95cbL117-R119)
[[5]](diffhunk://#diff-de54918fd984e65b76a54152ed551c23348819b572d4253d577d6c9650bc95cbL134-R138)
[[6]](diffhunk://#diff-de54918fd984e65b76a54152ed551c23348819b572d4253d577d6c9650bc95cbL203-R228)
[[7]](diffhunk://#diff-5354bacdeccbd2d6f61cee8d8206e6853f7505f353bfd33d556e05aba0a4db7fL129-R132)
[[8]](diffhunk://#diff-5354bacdeccbd2d6f61cee8d8206e6853f7505f353bfd33d556e05aba0a4db7fL357-R364)
[[9]](diffhunk://#diff-52614ca7b5c1da676f382429d3593900c0f2b449f57651f02cee47e72aa6736dL89-R93)
[[10]](diffhunk://#diff-52614ca7b5c1da676f382429d3593900c0f2b449f57651f02cee47e72aa6736dL151-R158)
[[11]](diffhunk://#diff-52614ca7b5c1da676f382429d3593900c0f2b449f57651f02cee47e72aa6736dL161-R171)
[[12]](diffhunk://#diff-52614ca7b5c1da676f382429d3593900c0f2b449f57651f02cee47e72aa6736dL242-R255)

Error handling for producer and helper classes:

* Added error returns for invalid result column IDs and broadcast join
conditions in `runtime_filter_producer_helper.cpp` and
`runtime_filter_producer_helper_cross.h`. Checks ensure correct filter
construction and insertion logic.
[[1]](diffhunk://#diff-bddbf8ad6f2ca00f5bd80c7ff32db5ec5d57a8ceab20a80b72e9296ec5281d7eL77-R80)
[[2]](diffhunk://#diff-bddbf8ad6f2ca00f5bd80c7ff32db5ec5d57a8ceab20a80b72e9296ec5281d7eL111-R132)
[[3]](diffhunk://#diff-bddbf8ad6f2ca00f5bd80c7ff32db5ec5d57a8ceab20a80b72e9296ec5281d7eL150-R168)
[[4]](diffhunk://#diff-c0909e54f288bc14f0c0057d7ea746384a62dfe8753d161b7d9d91eacc1859e9L54-R59)

Error handling for filter merging and assignment:

* Replaced assertions with error returns for filter state and type
mismatches in `runtime_filter_wrapper.cpp` during merging. Added
exceptions for failed string parsing in filter assignment for various
types. Checks for null filter functions and parsing failures in min/max
filter assignment.
[[1]](diffhunk://#diff-d951fabc29ca512bccab5af3c0eb9ce9bc0d3a59585988014d6972e17fc0350cL166-R176)
[[2]](diffhunk://#diff-d951fabc29ca512bccab5af3c0eb9ce9bc0d3a59585988014d6972e17fc0350cL291-R305)
[[3]](diffhunk://#diff-d951fabc29ca512bccab5af3c0eb9ce9bc0d3a59585988014d6972e17fc0350cL364-R383)
[[4]](diffhunk://#diff-d951fabc29ca512bccab5af3c0eb9ce9bc0d3a59585988014d6972e17fc0350cL375-R399)
[[5]](diffhunk://#diff-d951fabc29ca512bccab5af3c0eb9ce9bc0d3a59585988014d6972e17fc0350cL404-R433)
[[6]](diffhunk://#diff-d951fabc29ca512bccab5af3c0eb9ce9bc0d3a59585988014d6972e17fc0350cL419-R452)
[[7]](diffhunk://#diff-d951fabc29ca512bccab5af3c0eb9ce9bc0d3a59585988014d6972e17fc0350cL459-R503)
@github-actions github-actions bot requested a review from yiguolei as a code owner February 11, 2026 07:52
@hello-stephen
Copy link
Contributor

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

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@dataroaring dataroaring reopened this Feb 11, 2026
@hello-stephen
Copy link
Contributor

run buildall

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 17.71% (31/175) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.99% (19106/36054)
Line Coverage 36.15% (177885/492040)
Region Coverage 32.75% (137635/420243)
Branch Coverage 33.68% (59746/177413)

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.

4 participants