Skip to content

Ordering Equivalence Builder#6452

Merged
mustafasrepo merged 25 commits intoapache:mainfrom
synnada-ai:feature/orderin_equivalence_vec
May 27, 2023
Merged

Ordering Equivalence Builder#6452
mustafasrepo merged 25 commits intoapache:mainfrom
synnada-ai:feature/orderin_equivalence_vec

Conversation

@mustafasrepo
Copy link
Copy Markdown
Contributor

@mustafasrepo mustafasrepo commented May 26, 2023

Which issue does this PR close?

Closes #.

Rationale for this change

As suggested by @alamb in the discussion. Changing ordering equivalence creation to builder style would encapsulate the logic to equivalence.rs file. By this way we can increase maintainability of the codebase.
This PR implements this suggestion.

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions Bot added core Core DataFusion crate physical-expr Changes to the physical-expr crates labels May 26, 2023
Copy link
Copy Markdown
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @mustafasrepo this looks like a nice improvement to me. I am playing around locally with trying to move more of the equivalence calculations into this builder

Comment on lines +333 to +335
pub fn ordering_equivalence(&self) -> OrderingEquivalenceProperties {
self.ordering_eq_properties.clone()
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you could save a clone here if it took self by reference:

Suggested change
pub fn ordering_equivalence(&self) -> OrderingEquivalenceProperties {
self.ordering_eq_properties.clone()
}
pub fn build(self) -> OrderingEquivalenceProperties {
self.ordering_eq_properties
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed it, thanks for the suggestion

@mustafasrepo mustafasrepo deleted the feature/orderin_equivalence_vec branch June 13, 2023 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate physical-expr Changes to the physical-expr crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants