mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 00:55:55 +00:00
fix bug where timestamp val is wrong in Min/Max
This commit is contained in:
parent
db99b83bb2
commit
8f85a9e88d
1 changed files with 12 additions and 4 deletions
16
executor.go
16
executor.go
|
|
@ -1157,6 +1157,7 @@ func (e *executor) executeMin(ctx context.Context, qcx *Qcx, index string, c *pq
|
|||
if other.Count == 0 {
|
||||
return ValCount{}, nil
|
||||
}
|
||||
|
||||
return other, nil
|
||||
}
|
||||
|
||||
|
|
@ -7575,8 +7576,11 @@ func (vc *ValCount) smaller(other ValCount) ValCount {
|
|||
extra += other.Count
|
||||
}
|
||||
return ValCount{
|
||||
Val: vc.Val,
|
||||
Count: vc.Count + extra,
|
||||
Val: vc.Val,
|
||||
Count: vc.Count + extra,
|
||||
DecimalVal: vc.DecimalVal,
|
||||
FloatVal: vc.FloatVal,
|
||||
TimestampVal: vc.TimestampVal,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -7626,9 +7630,13 @@ func (vc *ValCount) larger(other ValCount) ValCount {
|
|||
extra += other.Count
|
||||
}
|
||||
return ValCount{
|
||||
Val: vc.Val,
|
||||
Count: vc.Count + extra,
|
||||
Val: vc.Val,
|
||||
Count: vc.Count + extra,
|
||||
DecimalVal: vc.DecimalVal,
|
||||
FloatVal: vc.FloatVal,
|
||||
TimestampVal: vc.TimestampVal,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (vc *ValCount) decimalLarger(other ValCount) ValCount {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue