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

Add MapAggregator from 1 (key, aggregator) pair #452

Merged

Conversation

vidma
Copy link
Contributor

@vidma vidma commented Jun 23, 2015

  • Make API easier to use (more consistent), by allowing to create a MapAggregator of one "metric"

improves: #411 (comment)

@vidma vidma force-pushed the features/map-aggregator-with-one-entry branch from a431f83 to e83e669 Compare June 23, 2015 13:41

// there's no Semigroup[Tuple1[T]], so just use T as intermediary type instead of Tuple1[T]
val aggregatorForOneItem = s"""
|def apply[A, B, C](aggDef: (String, ${aggType}Aggregator[A, B, C])): ${aggType}Aggregator[A, B, Map[String, C]] = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be (K, ${aggType}Aggregator[A, B, C]) so it matches the others? We should not require a String as the key, I don't think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 sure!

- Make API easier to use (more consistent), by allowing to create a MapAggregator of one "metric"
@vidma vidma force-pushed the features/map-aggregator-with-one-entry branch from e83e669 to cca1349 Compare June 24, 2015 00:16
@johnynek
Copy link
Collaborator

looks like this is hung on coveralls, trying to fix this issue here: #458

johnynek added a commit that referenced this pull request Jun 26, 2015
…ntry

Add MapAggregator from 1 (key, aggregator) pair
@johnynek johnynek merged commit b1e35ac into twitter:develop Jun 26, 2015
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

Successfully merging this pull request may close these issues.

2 participants