-
Notifications
You must be signed in to change notification settings - Fork 489
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
Fix bug where aggregate operations could not change type #1318
Conversation
Values: [][]interface{}{ | ||
{ | ||
time.Date(1971, 1, 1, 0, 0, 20, 0, time.UTC), | ||
1.0, |
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.
What would have happened previously? It would have been a int?
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.
Or does it have to do with the type of value
changing.
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.
Or is it something else entirely. I think I might be confused about what this fixes.
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 being this PR.
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.
Previously it would have errored and returned no value.
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.
To be more clear, the result here will always be an int since count returns an int. That isn't the type that is changing. Rather the type of the aggregate function used to perform the count (yes it is typed) wasn't changing. So in this test the first window is empty and so we choose a default type of float, but on the second window when there are actual values that are ints, we needed to change the aggregator function to be the int type function. Previous to this fix it would have logged an error about the types and returned no data for the count operation.
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.
got it
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.
that makes sense
636b1cf
to
7dfb18d
Compare
Fix bug where aggregate operations could not change type
Fixes #1271