Skip to content
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

Matrix2 does not support OrderedSerialization. #1418

Closed
johnynek opened this issue Aug 12, 2015 · 2 comments
Closed

Matrix2 does not support OrderedSerialization. #1418

johnynek opened this issue Aug 12, 2015 · 2 comments

Comments

@johnynek
Copy link
Collaborator

Ofter Orderings are composed in here:

https://github.com/twitter/scalding/blob/develop/scalding-core/src/main/scala/com/twitter/scalding/mathematics/Matrix2.scala

We need to do that using:
https://github.com/twitter/scalding/blob/develop/scalding-serialization/src/main/scala/com/twitter/scalding/serialization/Serialization2.scala#L61

if all Orderings are OrderedSerializations. We probably need some method like:

implicit def withOrderedSerialization[A: Ordering, B: Ordering]: Ordering[(A, B)] =
  // if both Orderings are OrderedSerialization, use OrderedSerialization2, else Ordering.tuple2 

and use that in internal methods.

@reconditesea
Copy link
Contributor

@johnynek Here I think if the individual ordering for row/col is an OrderedSerialization, it will just work. But for the composed ordering of the two, we will need to add OrderedSerialization support. Is this correct?

@johnynek
Copy link
Collaborator Author

Yes, that's right. Sometimes we group on the pair, and that needs to be composed properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants