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

Spread #1591

Merged
merged 6 commits into from
Feb 12, 2015
Merged

Spread #1591

merged 6 commits into from
Feb 12, 2015

Conversation

corylanou
Copy link
Contributor

Fixes #1476

}
result.Rows[0] = row
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change was due to go vet failing. There is an unfortunate side affect of typed slices outside of the package that it doesn't understand, and will likely not change this behavior.

@otoolep
Copy link
Contributor

otoolep commented Feb 12, 2015

If the goal is to have each mapper send its local max and mix, and then the reducer emit the difference between the largest of all maxes and the smallest of all mins, then +1. I have one 1 minor comment.

result.max = math.Max(result.max, val.max)
result.min = math.Min(result.min, val.min)
}
spread := result.max - result.min
Copy link
Contributor

Choose a reason for hiding this comment

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

Not much point calculating spread if pointsYielded is false after the for loop.

corylanou added a commit that referenced this pull request Feb 12, 2015
@corylanou corylanou merged commit bcfeb0b into master Feb 12, 2015
@corylanou corylanou deleted the spread branch February 12, 2015 18:25
@@ -753,6 +755,52 @@ func ReduceMax(key Key, values []interface{}, e *Emitter) {
}
}

type spreadMapOutput struct {
min, max float64
Copy link
Member

Choose a reason for hiding this comment

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

These should be exported so that they can be serialized later

@pauldix
Copy link
Member

pauldix commented Feb 12, 2015

I know you just merged, but I had one comment.

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.

Wire up spread aggregate function
3 participants