-
Notifications
You must be signed in to change notification settings - Fork 609
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
fix(ir): ensure that schema column order matters #9068
Conversation
4930e6b
to
94c3db6
Compare
1b4c0c0
to
6380b0f
Compare
def __eq__(self, other: Any) -> bool: | ||
if not isinstance(other, collections.abc.Mapping): | ||
return NotImplemented | ||
return collections.OrderedDict(self) == collections.OrderedDict(other) |
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.
I assume the point of this change is to turn differently ordered projections unequal.
Since we use FrozenDict
heavily across the codebase how about adding a FrozenOrderedDict(FrozenDict)
for this purpose using all(a == b for a, b in zip_longest(self.items(), other.items()))
for comparison?
Then FrozenOrderedDict
could be used for the relevant relational operations instead of FrozenDict
.
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.
Agreed, let's do that after the 9.0 release!
6380b0f
to
764fc94
Compare
Clouds are passing:
|
Closing in favor of #9081. |
Ensure that column order is taken into account for equality comparisons. Fixes #9063.