mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
apply default base logic to BSI v1 migration code
This commit is contained in:
parent
c5140ba88d
commit
9e9103d98f
1 changed files with 7 additions and 1 deletions
8
field.go
8
field.go
|
|
@ -508,7 +508,13 @@ func (f *Field) loadMeta() error {
|
|||
|
||||
// Initialize "base" to "min" when upgrading from v1 BSI format.
|
||||
if pb.BitDepth == 0 {
|
||||
pb.Base = pb.Min
|
||||
if pb.Min > 0 {
|
||||
pb.Base = pb.Min
|
||||
} else if pb.Max < 0 {
|
||||
pb.Base = pb.Max
|
||||
} else {
|
||||
pb.Base = 0
|
||||
}
|
||||
pb.BitDepth = uint64(bitDepthInt64(pb.Max - pb.Min))
|
||||
if pb.BitDepth == 0 {
|
||||
pb.BitDepth = 1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue