ALIGN - Time bucket alignment control for AGGREGATION. This will control the time bucket timestamps by changing the reference timestamp on which a bucket is defined.
Possible values:
start or -: The reference timestamp will be the query start interval time (fromTimestamp).
end or +: The reference timestamp will be the signed remainder of query end interval time by the AGGREGATION time bucket (toTimestamp % timeBucket).
A specific timestamp: align the reference timestamp to a specific time.
Align to the query end interval time (toTimestamp). The reference timestamp will be the signed remainder of query end interval time by the AGGREGATION time bucket (toTimestamp % timeBucket).
https://github.com/RedisTimeSeries/RedisTimeSeries/pull/801
Detailed TS.RANGE args with the new
ALIGN
featureDetail of
ALIGN
docsALIGN - Time bucket alignment control for AGGREGATION. This will control the time bucket timestamps by changing the reference timestamp on which a bucket is defined. Possible values:
start
or-
: The reference timestamp will be the query start interval time (fromTimestamp).end
or+
: The reference timestamp will be the signed remainder of query end interval time by the AGGREGATION time bucket (toTimestamp % timeBucket).Note: when not provided alignment is set to
0
.Sample behaviour:
( first ingestion )
Old behaviour and the default behaviour when no
ALIGN
is specified ( aligned to 0 ):Align to the query start interval time (fromTimestamp)
Align to the query end interval time (toTimestamp). The reference timestamp will be the signed remainder of query end interval time by the AGGREGATION time bucket (toTimestamp % timeBucket).
Align to a timestamp