-
Notifications
You must be signed in to change notification settings - Fork 646
feat: delay temporal filter && optimize dyn filter with always relax condition #13985
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
d2a756c
allow now in upper bound condition
st1page 0b07553
hack append only
st1page 2e9e64f
Merge branch 'main' into sts/delay_temporal_filter
st1page f4a5b69
comments
st1page 713e9b1
add always relax flag
st1page e28149c
implement dyn filter condition always relax
st1page 52b0563
add test
st1page 72b49a5
add test with state table
st1page fab5a54
add todo comment
st1page 1176799
add more for the hack
st1page 4205779
change plan style
st1page 9b4e1dd
change the cleaning with range delete
st1page a9fc8d4
clippy
st1page ee51c0c
Update proto/stream_plan.proto
st1page 8187926
better var name
st1page 4ea9960
Update src/frontend/src/optimizer/plan_node/stream_dynamic_filter.rs
st1page 12982b9
Update src/stream/src/executor/dynamic_filter.rs
st1page File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,7 +88,12 @@ fn visit_stream_node_tables_inner<F>( | |
always!(node.right_degree_table, "HashJoinDegreeRight"); | ||
} | ||
NodeBody::DynamicFilter(node) => { | ||
always!(node.left_table, "DynamicFilterLeft"); | ||
if node.condition_always_relax { | ||
always!(node.left_table, "DynamicFilterLeftNotSatisfy"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we test this new branch somehow? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The current e2e test includes the branch. |
||
} else { | ||
always!(node.left_table, "DynamicFilterLeft"); | ||
} | ||
|
||
always!(node.right_table, "DynamicFilterRight"); | ||
} | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
What about case where we have non-monotonic input. 🤔
For now I suppose it's not supported. But I guess that's the intention of having the
is_monotonic
flag previously.Perhaps we should just keep that field commented out instead of removing it.
I don't think
condition_always_relax
can handle it.Because when
condition_always_relax
is false, I think the current intention is for it to mean that right hand's side change always more the condition more constrained. But this only holds for monotonic RHS.With no monotonicity property, the opposite of it actually implies that right side's change sometimes makes the condition more relaxed, sometimes more constrained.
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.
when we need it, we can add it back. I think the field should be on-demand by the executor with its specific optimization.
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.
In that case I think we should still add some comment, because
DynamicFilter
's RHS may not always be monotonic.So for the
condition_always_relax
we should add a comment which says that we assume the input to always be monotonically changing.