From 98cb7634992b53294102955ffb2e08aea19a6ee2 Mon Sep 17 00:00:00 2001 From: Matthew Jaffee Date: Sat, 28 May 2022 08:25:04 -0500 Subject: [PATCH] don't use base for timestamp fields --- client/batch.go | 3 +++ client/orm.go | 2 ++ 2 files changed, 5 insertions(+) diff --git a/client/batch.go b/client/batch.go index b37895ea0..4616e8f78 100644 --- a/client/batch.go +++ b/client/batch.go @@ -1359,6 +1359,9 @@ func (b *Batch) makeSingleValFragments(frags, clearFrags fragments) (fragments, } field := b.headerMap[fieldName] base := field.Options().base + if field.Options().Type() == FieldTypeTimestamp { + base = 0 + } shard := ids[0] / shardWidth bitmap := frags.GetOrCreate(shard, fieldName, "bsig_"+fieldName) // TODO... grab bsig_ prefix from elsewhere diff --git a/client/orm.go b/client/orm.go index 80f262600..eeaf09bf2 100644 --- a/client/orm.go +++ b/client/orm.go @@ -826,10 +826,12 @@ func (fo FieldOptions) String() string { case FieldTypeInt: mopt["min"] = fo.min mopt["max"] = fo.max + // TODO add base case FieldTypeDecimal: mopt["min"] = fo.min mopt["max"] = fo.max mopt["scale"] = fo.scale + // TODO add base? case FieldTypeTime: mopt["timeQuantum"] = string(fo.timeQuantum) mopt["noStandardView"] = fo.noStandardView