mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
previously we allowed users to specify a granularity for timestamp
e.g. seconds, milli, micro, nano
however we converted everything to nano before we stored it.
This reduced the allowed range for all time units to what
was allowed by timestamp. For example, with second granularity
you can represent billions of years within the capacity of
int64 but with nano its somewhere b/w 100-200 years.
So now, for timeunits of seconds, milli, and micro the range
is year 0001 - 9999. These limits come from what Go
supports.
So this uses unit specific function to translate
timestamps to values and vice versa to increase
the time range.
In the process of increasing the range for timestamp and subsequent
testing, I found and addressed a few bugs:
- min/max queries were not using timestamp specific comparators so
added that.
- Values from Import/ingest come to FB as relative values to epoch
whereas other BSI fields come as actual values and then
becomes relative to their respective bases within FB. so some
specific handling of that was added.
- However! Set queries use timestamp strings which are, of course,
the actual value they designate. So they have to become
relative.
- When bitdepth is 0, Min/maxUnsigned functions did not run
resulting in a count of 0 when there
was an actual value that was 0.
Also, this removes (now) dead code and updates/adds tests.
|
||
|---|---|---|
| .. | ||
| testdata/certs | ||
| cluster_test.go | ||
| config.go | ||
| config_internal_test.go | ||
| config_test.go | ||
| dup.go | ||
| dup_arm64.go | ||
| grpc.go | ||
| grpc_internal_test.go | ||
| grpc_test.go | ||
| handler_test.go | ||
| pg.go | ||
| pg_internal_test.go | ||
| pg_test.go | ||
| server.go | ||
| server_internal_test.go | ||
| server_test.go | ||
| sql.go | ||
| tlsconfig.go | ||
| tlsconfig_test.go | ||
| trial.go | ||