code: func (b *bsiGroup) baseValue(op pql.Token, value int64) (baseValue uint64, outOfRange bool) {
  	if op == pql.GT || op == pql.GTE {
  		if value > b.Max {
  			return baseValue, true
  		} else if value > b.Min {
  			baseValue = uint64(value - b.Min)
  		}
  	} else if op == pql.LT || op == pql.LTE {
  		if value < b.Min {
  			return baseValue, true
  		} else if value > b.Max {
  			baseValue = uint64(b.Max - b.Min)
  		} else {
  			baseValue = uint64(value - b.Min)
  		}
  	} else if op == pql.EQ || op == pql.NEQ {
  		if value < b.Min || value > b.Max {
  			return baseValue, true
  		}
  		baseValue = uint64(value - b.Min)
  	}
  	return baseValue, false
  }
docs: // baseValue adjusts the value to align with the range for Field for a certain
  // operation type.
  // Note: There is an edge case for GT and LT where this returns a baseValue
  // that does not fully encompass the range.
  // ex: Field.Min = 0, Field.Max = 1023
  // baseValue(LT, 2000) returns 1023, which will perform "LT 1023" and effectively
  // exclude any columns with value = 1023.
  // Note that in this case (because the range uses the full BitDepth 0 to 1023),
  // we can't simply return 1024.
  // In order to make this work, we effectively need to change the operator to LTE.
  // Executor.executeBSIGroupRangeShard() takes this into account and returns
  // `frag.FieldNotNull(bsig.BitDepth())` in such instances.