Browse Source

Skip any empty range/boundary elements, not only nil ones.

pull/273/head
Julius Volz 12 years ago
parent
commit
21c3be0814
  1. 4
      rules/ast/persistence_adapter.go

4
rules/ast/persistence_adapter.go

@ -126,7 +126,7 @@ func (v *viewAdapter) GetValueAtTime(fingerprints model.Fingerprints, timestamp
func (v *viewAdapter) GetBoundaryValues(fingerprints model.Fingerprints, interval *model.Interval) (sampleSets []model.SampleSet, err error) {
for _, fingerprint := range fingerprints {
samplePairs := v.view.GetBoundaryValues(fingerprint, *interval)
if samplePairs == nil {
if len(samplePairs) == 0 {
continue
}
@ -148,7 +148,7 @@ func (v *viewAdapter) GetBoundaryValues(fingerprints model.Fingerprints, interva
func (v *viewAdapter) GetRangeValues(fingerprints model.Fingerprints, interval *model.Interval) (sampleSets []model.SampleSet, err error) {
for _, fingerprint := range fingerprints {
samplePairs := v.view.GetRangeValues(fingerprint, *interval)
if samplePairs == nil {
if len(samplePairs) == 0 {
continue
}

Loading…
Cancel
Save