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

Generalize flat container implementations to less specific regions #518

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

antiguru
Copy link
Member

@antiguru antiguru commented Jul 2, 2024

This change redefines some trait implementations in differential for flat containers to be in terms of regions fulfilling some requirements instead of specific regions. The current implementation makes it impossible to implement the traits for specific regions due to Rust's orphan rules, which blocks us from using custom region implementations in Materialize.

The change should be localized to traits and implementations related to flat container. It includes some overdue renaming to make traits and generic parameters slightly more understandable.

I'm not sure about this. It's a gross change as it pulls behavior across
unrelated places, but I'm also not sure how to implement without
effectively duplicating the `MergerChunk`. What might work is a trait that
extends `MergerChunk` and just adds the `cmp_without_diff` function.

Signed-off-by: Moritz Hoffmann <antiguru@gmail.com>
Signed-off-by: Moritz Hoffmann <antiguru@gmail.com>
Signed-off-by: Moritz Hoffmann <antiguru@gmail.com>
Signed-off-by: Moritz Hoffmann <antiguru@gmail.com>
@@ -280,27 +280,29 @@ where
}
}

impl<K, V, T, R> ConsolidateLayout for FlatStack<TupleABCRegion<TupleABRegion<K, V>, T, R>>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is important.

@@ -448,36 +448,30 @@ mod flatcontainer {
type OffsetContainer = OffsetList;
}

impl<K,KBC,V,VBC,T,R> BuilderInput<KBC, VBC> for FlatStack<TupleABCRegion<TupleABRegion<K,V>,T,R>>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is important.

Signed-off-by: Moritz Hoffmann <antiguru@gmail.com>
@@ -49,7 +49,7 @@ timely = {workspace = true}

[workspace.dependencies]
#timely = { version = "0.12", default-features = false }
timely = { git = "https://github.com/TimelyDataflow/timely-dataflow", default-features = false }
timely = { git = "https://github.com/antiguru/timely-dataflow", branch = "flatcontainer_storage", default-features = false }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: Moritz Hoffmann <antiguru@gmail.com>
Signed-off-by: Moritz Hoffmann <antiguru@gmail.com>
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.

1 participant