-
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
feat(storage/reads): add window agg result set #19725
Conversation
860da58
to
f7e1bda
Compare
f7e1bda
to
8e0328a
Compare
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.
I'm assuming this is just a straight copy?
@jlapacik no, it wasn’t. It’s mostly copied but I had to make some adjustments to make this work in OSS. I can outline them for your tomorrow if needed. |
That would be helpful thank you. |
request := datatypes.ReadWindowAggregateRequest{ | ||
Aggregate: []*datatypes.Aggregate{ | ||
{ | ||
Type: datatypes.AggregateTypeMean, |
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.
Since we're porting the mean agg first, these tests use mean.
5000000000000000, | ||
5097600000000001, | ||
}, | ||
Values: []int64{100, 55, 256, 83, 99, 124, 1979, 4, 67, 49929, 51000}, |
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.
There wasn't an equal number of values and timestamps, so I adjusted that here.
floatArrayCursor := cursor.(cursors.FloatArrayCursor) | ||
floatArray := floatArrayCursor.Next() |
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.
Since this is using mean, floatArrayCursors are needed instead of integer.
var itr cursors.CursorIterator | ||
var cur cursors.Cursor | ||
itr, c.itrs = c.itrs[0], c.itrs[1:] |
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.
OSS uses cursor iterator lists. In order to follow that convention here, I have to access the list to get the cursorIterator value.
@@ -244,15 +317,15 @@ func (c {{$type}}) Next() {{$arrayType}} { | |||
|
|||
{{end}} | |||
|
|||
type integer{{.Name}}CountArrayCursor struct { | |||
type {{.Name}}CountArrayCursor struct { |
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 was actually a change to make this match the original code a little more. the interger
before these types is redundant.
@jlapacik i think those are most of the relevant changes. Thanks |
Add aggregate_resultset to OSS for mean aggregate pushdowns.