yezhizi commented on issue #3265:
URL: https://github.com/apache/kvrocks/issues/3265#issuecomment-3750526729

   @var-nan 
   `auxInfo` stores the aggregated value from the preceding chunks (excluding 
the current/last one) that belong to the latest bucket.
   
   For example, the latest bucket is 10, `auxInfo` would store the aggregated 
value of 11–18 in the following case:
   ```
   | chunk 0 |  | chunk 1  |  | chunk 2  |
   | 0  4 11 |  | 15 16 18 |  | 19       |
          |_______________|
                   |
   ```
   
   If the latest bucket has no data in the preceding chunks, `auxInfo` will be 
[“reset”](https://github.com/apache/kvrocks/blob/b5b419995c8327bd07a6d63090da367d98f59b72/src/types/redis_timeseries.cc#L377)(For
 the MAX aggregator, the value is NaN in the case you mentioned).
   ```
   | chunk 0 |  | chunk 1  |  | chunk 2  |   (latest bucket is 20)
   | 0  4 11 |  | 15 16 18 |  | 21  22   |
   ```
   
   Your approach to accessing the auxiliary info is correct. For the MAX 
aggregator, if the auxInfo value is NaN, it should indicate that samples from 
the latest bucket are only contained within the last/current chunk; therefore, 
the auxiliary info can be ignored in this case.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to