BiteTheDDDDt opened a new pull request, #60563:
URL: https://github.com/apache/doris/pull/60563
### What problem does this PR solve?
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-5354bacdeccbd2d6f61cee8d820
6e6853f7505f353bfd33d556e05aba0a4db7fL129-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)
### 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:
https://github.com/apache/doris-website/pull/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 -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]