-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Conversation
} | ||
result.Rows[0] = row |
There was a problem hiding this comment.
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.
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 |
There was a problem hiding this comment.
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.
@@ -753,6 +755,52 @@ func ReduceMax(key Key, values []interface{}, e *Emitter) { | |||
} | |||
} | |||
|
|||
type spreadMapOutput struct { | |||
min, max float64 |
There was a problem hiding this comment.
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
I know you just merged, but I had one comment. |
Fixes #1476