-
Notifications
You must be signed in to change notification settings - Fork 239
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
make sure interpreted and compiled orderings agree #4871
Conversation
I'm fine with this. |
do you have an example of something that changed? |
(would like to include that in patch notes) |
Consider [NaN] < [0.0]. Before, array compare used |
But only when ExtendedOrdering is used, which I think is pretty rare, now, just in |
Is this technically a file format change? If I have something keyed by |
Ordering should always use |
er, the interpreter isn't used for file formats. carry on |
Yes, what @catoverdrive said, so the file formats should be OK. |
rebase? |
38ce1a0
to
c8602d6
Compare
ext(pord).min(this.left, other.left).asInstanceOf[IntervalEndpoint], | ||
ext(pord).max(this.right, other.right).asInstanceOf[IntervalEndpoint]) | ||
// min(this.left, other.left) | ||
if (ext(pord).lt(this.left, other.left)) |
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 feel like these should maybe be using compare
, no? otherwise (I think) we can get things like
hull([-0.0, 1.0], [0.0, 1.0]) = [0.0, 1.0]
hull([0.0, 1.0], [-0.0, 1.0]) = [-0.0, 1.0]
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.
Yeah. In fact, I think Interval should use compare (total ordering) everywhere. That matches the old behavior, too. Fixed.
Builds on: #4869
ExtendedOrdering on rows and containers now matches CodeOrdering by using lt instead of compare in lt, etc.
FYI @tpoterba since this could potentially (e.g. comparing arrays with nans) cause a user-visible change in behavior.