Repository navigation
[order_by] Deprecate using order_value from payload, dedup by (order_value, id) tuple - #6233
Merged
Merged
Conversation
coszio
force-pushed
the
deprecate-order-value-in-payload
branch
from
March 24, 2025 19:01
c5087af to
0ebb6c8
Compare
This comment was marked as resolved.
This comment was marked as resolved.
timvisee
reviewed
Mar 25, 2025
Comment on lines
+349
to
+361
| // 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) |
Member
There was a problem hiding this comment.
Is this desirable behavior?
Could we other wise dedup by the tuple (record_a.id, record_a.order_value)?
Contributor
Author
There was a problem hiding this comment.
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?
Member
There was a problem hiding this comment.
Thanks. I think this is better!
There does seem to be some unit test failure now, but the test may be wrong.
timvisee
approved these changes
Mar 27, 2025
order_value from payloadorder_value from payload, dedup by (order_value, id) tuple
timvisee
added a commit
that referenced
this pull request
Mar 31, 2025
…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 <[email protected]>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.