redis / go-redis

Redis Go client
https://redis.uptrace.dev
BSD 2-Clause "Simplified" License
20.14k stars 2.37k forks source link

TSMRange - make fromTimestamp and toTimestamp interface typed instead of int #2979

Open tpoxa opened 7 months ago

tpoxa commented 7 months ago

Redis documentation says:

fromTimestamp

is start timestamp for the range query (integer Unix timestamp in milliseconds) or - to denote the timestamp of the earliest sample in the time series.

So I believe with having this argument as int I can not denote - as a time of the earliest sample. Not sure if using 0 same efficient as -

Same goes for +

monkey92t commented 6 months ago

It looks like this is an issue introduced by #2688, which seems to affect many APIs. However, go-redis needs to ensure API compatibility. It looks like we'll need to come up with a way to redesign it.