flux icon indicating copy to clipboard operation
flux copied to clipboard

Add every parameter for window to aggregateWindow

Open affo opened this issue 6 years ago • 6 comments

aggregateWindow doesn't support every parameter in window.

For example, one cannot specify offset.

Make it so.

affo avatar Jul 25 '19 10:07 affo

Can anyone help me understand how I am meant to use offset when aggregateWindow is being used?

I can't for life of me figure it out, and it's meant I can't migrate a query I've used in InfluxQL to Flux.

mabnz avatar Apr 16 '20 05:04 mabnz

@mabnz I think you are targeting the right issue.

aggregateWindow does not expose every window argument.

This needs to be done.

FYI @nathanielc

affo avatar Apr 16 '20 08:04 affo

So far, offset is still not added to aggregateWindow. So I have to use window instead of aggregateWindow when I need offset, but window is slower. Another question is why is window so much slower than aggregateWindow when they are doing the same task.

Congyuwang avatar Sep 24 '20 12:09 Congyuwang

Same here. We wanted to migrate our InfluxDB 1.7.10 instance in production to 2.0 however because of not being able to use offset in aggregateWindow i can't, would be a really good feature

Pedrat avatar Mar 23 '21 17:03 Pedrat

Offset has been added in https://github.com/influxdata/flux/pull/3580

nathanielc avatar Mar 26 '21 16:03 nathanielc

This would also be useful in timedMovingAverage() and probably others. Use case is time aligning the source samples for thresholding via a join.

Without an offset parameter for the moving average, additional work is required to align them, e.g using truncateTimeColumn() and this isn't always appropriate.

Also as a comment, I do think it's worth looking at the origin parameter of the timescale time_bucket function, which permits the reference epoch for windowing functions to be specified explicitly or derived from the data being windowed. This offers greater flexibility.

ArrEssJay avatar Dec 07 '21 04:12 ArrEssJay

This issue has had no recent activity and will be closed soon.

github-actions[bot] avatar Jun 21 '24 01:06 github-actions[bot]