-
Notifications
You must be signed in to change notification settings - Fork 416
executor: disable runtime filter on join key type mismatch #10698
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
base: master
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
📝 WalkthroughWalkthroughAdds a conservative compatibility check that disables generation of join runtime filters when join key protobuf field types or integer signed/unsigned flags differ; Changes
Sequence Diagram(s)(Skipped) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
91d4f88 to
1f12fc2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@dbms/src/Flash/Planner/Plans/PhysicalJoin.cpp`:
- Around line 173-212: Rename the snake_case local symbols to camelCase: change
the lambda is_join_key_field_type_compatible to isJoinKeyFieldTypeCompatible,
the bool enable_runtime_filter to enableRuntimeFilter, and runtime_filter_list
to runtimeFilterList; update the lambda invocation and its use sites (the const
bool assignment and the ternary that builds runtimeFilterList using
tiflash_join.genRuntimeFilterList) so all references match the new camelCase
names and keep behavior unchanged.
1f12fc2 to
f61f401
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@dbms/src/Flash/tests/gtest_runtime_filter_disable_on_type_mismatch.cpp`:
- Around line 43-49: The loop variable name in the WrapForRuntimeFilterTestBegin
macro is declared as enablePipeline but the test code uses enable_pipeline,
causing a compile error; fix by making the identifier consistent—either change
the macro's loop variable to enable_pipeline or update all references (the
usages currently named enable_pipeline) to enablePipeline so the symbol matches,
ensuring WrapForRuntimeFilterTestBegin and all occurrences use the same
identifier.
🧹 Nitpick comments (2)
dbms/src/Flash/Planner/Plans/PhysicalJoin.cpp (1)
161-199: Conservative guard logic looks correct; minor style nit on redundantcontinue.The lambda correctly checks:
- Equal number of join keys
- Both keys have valid field types
- Same protobuf type (
tp())- Same unsigned flag
One minor observation: the
continue;on line 196 is redundant as it's at the end of the for-loop body.🧹 Optional: remove redundant continue
// Otherwise keep conservative: if we got here (same tp + same unsigned flag), treat as compatible. - continue; } return true; };dbms/src/Flash/tests/gtest_runtime_filter_disable_on_type_mismatch.cpp (1)
43-49: Use the existingWRAP_FOR_TEST_BEGINandWRAP_FOR_TEST_ENDmacros fromExecutorTestUtils.h.The file already imports
ExecutorTestUtils.hand extendsExecutorTest, making it an executor test that should follow the established pattern. The customWrapForRuntimeFilterTestBegin/Endmacros duplicate the existingWRAP_FOR_TEST_BEGIN/ENDmacros and are already used consistently throughout other executor tests indbms/src/Flash/tests/. Replace lines 43-49 with the standard macros to maintain consistency with the codebase pattern.
| #define WrapForRuntimeFilterTestBegin \ | ||
| std::vector<bool> pipelineBools{false, true}; \ | ||
| for (auto enablePipeline : pipelineBools) \ | ||
| { \ | ||
| enablePipeline(enablePipeline); | ||
|
|
||
| #define WrapForRuntimeFilterTestEnd } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable name mismatch will cause compilation error.
The macro defines loop variable enablePipeline (camelCase), but lines 87, 102, and 117 reference enable_pipeline (snake_case). This will fail to compile.
🐛 Proposed fix
`#define` WrapForRuntimeFilterTestBegin \
- std::vector<bool> pipelineBools{false, true}; \
- for (auto enablePipeline : pipelineBools) \
+ std::vector<bool> pipeline_bools{false, true}; \
+ for (auto enable_pipeline : pipeline_bools) \
{ \
- enablePipeline(enablePipeline);
+ enablePipeline(enable_pipeline);Alternatively, update references at lines 87, 102, and 117 to use enablePipeline:
- {"table_scan_0", {3, enable_pipeline ? concurrency : 1}},
+ {"table_scan_0", {3, enablePipeline ? concurrency : 1}},Also applies to: 87-87
🤖 Prompt for AI Agents
In `@dbms/src/Flash/tests/gtest_runtime_filter_disable_on_type_mismatch.cpp`
around lines 43 - 49, The loop variable name in the
WrapForRuntimeFilterTestBegin macro is declared as enablePipeline but the test
code uses enable_pipeline, causing a compile error; fix by making the identifier
consistent—either change the macro's loop variable to enable_pipeline or update
all references (the usages currently named enable_pipeline) to enablePipeline so
the symbol matches, ensuring WrapForRuntimeFilterTestBegin and all occurrences
use the same identifier.
39df34f to
a36018a
Compare
a36018a to
12f0add
Compare
|
@ChangRui-Ryan: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What problem does this PR solve?
Issue Number: close #10699
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note
Summary by CodeRabbit
Bug Fixes
Tests