Skip to content
This repository was archived by the owner on Apr 8, 2021. It is now read-only.

Use partial order to support different split behaviors - #87

Open
erik-stripe wants to merge 6 commits into
stripe-archive:masterfrom
erik-stripe:erik-partial-order
Open

erik-stripe wants to merge 6 commits into
stripe-archive:masterfrom
erik-stripe:erik-partial-order

Conversation

@erik-stripe

Copy link
Copy Markdown
Contributor

This PR moves brushfire-core over to use spire.algebra.PartialOrder and spire.algebra.Order where applicable. At this point we don't actually use any partial orderings, but the support is there.

Before we merge this I'd like to add some tests to prove this is working, and maybe flesh out support for the is present use-case a bit. What do you all think we need?

Review by @tixxit and @avibryant.

This is the minimal commit necessary to switch from using
scala.math.Ordering to spire.algebra.PartialOrder in Predicate.
This leaves other uses of scala.math.Ordering alone -- in fact
we may want to switch those for spire.algebra.Order as well.
This commit completes the previous work adding PartialOrder.
It also removes a bunch of unnecessary ordering constraints
we had added (and instances we were capturing). It should
not change how Brushfire actually works (yet).
@erik-stripe erik-stripe changed the title Erik partial order Use partial order to support different split behaviors Mar 22, 2016
@tixxit

tixxit commented Mar 22, 2016

Copy link
Copy Markdown
Contributor

Tests are good, but I don't think we need to flesh out the is-present stuff in this PR. Just moving Dispatched over to using a PartialOrder would be enough.

@erik-stripe

Copy link
Copy Markdown
Contributor Author

OK, that makes sense. I'll do that next.

This is an improvement since we have a principled way to
handle the "error case" now.
@erik-stripe

Copy link
Copy Markdown
Contributor Author

Alright, Dispatched is moved over (that was easy!).

@erik-stripe

Copy link
Copy Markdown
Contributor Author

I updated this to master, should be able to be merged.

?r @tixxit @johnynek

@johnynek

Copy link
Copy Markdown
Contributor

This looks good to me.

I do think if we are going to use spire more (and we should) we will get mileage out of the algebra work to make algebird, scalding and spire work better together.

That or give up and make a spire-algebird package that gives conversions between the various typeclasses.

@CLAassistant

CLAassistant commented Aug 6, 2020 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants