Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Nov 16, 2023

Which issue does this PR close?

Part of #8064

Rationale for this change

As equivalence and ordering become ever more important, I would like to break the code up into smaller modules to make it harder to handle.

At almost 3000 lines with several large classes that are overlapping. the existing equivalence.rs is hard to understand.

I would like to break it up into smaller modules.

In fact I didn't even realize there were so many equivalence tracking structures until I started looking at the code more closely.

What changes are included in this PR?

Move EquivalenceClass, EquivalenceGroup, OrderingEquivalenceClass, ProjectionMapping, EquivalenceProperties; and into their own modules, and then update some internal apis to keep the interfaces clear

Are these changes tested?

Are there any user-facing changes?

Existing tests

@github-actions github-actions bot added the physical-expr Changes to the physical-expr crates label Nov 16, 2023
@alamb alamb changed the title Alamb/extract equivalence Minor: Split equivalence classes into smaller modules Nov 16, 2023
@@ -0,0 +1,488 @@
// Licensed to the Apache Software Foundation (ASF) under one
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This code was simply moved around, no algorithmic changes were made

@alamb alamb changed the title Minor: Split equivalence classes into smaller modules Minor: Split equivalence code into smaller modules Nov 16, 2023
@ozankabak
Copy link
Contributor

Thanks for this. I agree that it is a good idea. One minor timing issue: @mustafasrepo is currently working on a few finishing touches to this code, so doing this next week will probably (1) enable us to see the full picture before doing the re-org, (2) save us some time by avoiding merge conflicts

@alamb
Copy link
Contributor Author

alamb commented Nov 16, 2023

Sounds good -- I'll leave this as a draft until @mustafasrepo 's in flight work

@alamb
Copy link
Contributor Author

alamb commented Nov 28, 2023

Now that the new code has been merged, I think this is possible now. However, I don't think I can salvage this PR -- it would make more sense to start from scratch

@alamb
Copy link
Contributor Author

alamb commented Dec 22, 2023

Field #8633 to track doing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-expr Changes to the physical-expr crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants