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.
When using e.g. algebird
PriorityQueueMonoid
, scio needs to serialize java PriorityQueues. If Kryo is used, especially for small queues, there can be significant overhead.Instead, this PR provides a PriorityQueue coder backed by a scala
Ordering
(as indeed the monoid is).The coder must be created explicitly by the user so that they are asserting that the comparator of the original PriorityQueues and the reconstituted ones are the same. e.g.
@RustedBones Is there some trick I can use to get an error message when
Coder[java.util.PriorityQueue[T]]
fails to be derived (that's not just the generic implicitNotFound onCoder
)?