-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[order_by] Deprecate using order_value
from payload, dedup by (order_value, id)
tuple
#6233
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
Conversation
c5087af
to
0ebb6c8
Compare
This comment was marked as resolved.
This comment was marked as resolved.
// This means that the same point will be repeated only if there is an alternating order value with another point | ||
// E.g. | ||
// For these points | ||
// { id: 1, values: [11, 21]} | ||
// { id: 2, values: [12, 22, 32]} | ||
// | ||
// The output will be | ||
// { id: 1, order_value: 11 } | ||
// { id: 2, order_value: 12 } | ||
// { id: 1, order_value: 21 } | ||
// { id: 2, order_value: 22 } | ||
// (no order_value 32) | ||
.dedup_by(|record_a, record_b| record_a.id == record_b.id) |
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.
Is this desirable behavior?
Could we other wise dedup by the tuple (record_a.id, record_a.order_value)
?
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 have the same opinion, here I only documented the current behavior.
IIRC, the intention for this is that the case when a point has many values, to only use one of them if they are consecutive, and there is no interleaving with another point. But tbh, it looks more like a bug, like it puzzled even ourselves.
@generall thoughts?
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.
Changed in c07682d
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.
Thanks. I think this is better!
There does seem to be some unit test failure now, but the test may be wrong.
order_value
from payloadorder_value
from payload, dedup by (order_value, id)
tuple
…er_value, id)` tuple (#6233) * deprecate inserting order_value in payload, use the one in the struct instead * fix for test * dedup by (order_value, id) tuple * Scroll dedup test must also consider order value * Update assert message, include order value --------- Co-authored-by: timvisee <tim@visee.me>
Initially, we started inserting the order_by value in the payload. Since version 1.11 we can already deprecate this behavior because now we have a dedicated field in the point struct.
This PR removes the legacy code which inserted and removed the order_by value in the payload.