Set sets rho for the specified register index. Caller must ensure that each register is set no more than once.
(index uint16, rho byte)
| 200 | |
| 201 | // Set sets rho for the specified register index. Caller must ensure that each register is set no more than once. |
| 202 | func (hll *HLL) Set(index uint16, rho byte) { |
| 203 | hll.NonZeroRegisters++ |
| 204 | |
| 205 | if len(hll.DenseData) != 0 { |
| 206 | hll.DenseData[index] = rho |
| 207 | return |
| 208 | } |
| 209 | |
| 210 | hll.SparseData = append(hll.SparseData, HLLRegister{index, rho}) |
| 211 | |
| 212 | if hll.NonZeroRegisters*4 >= 1<<hllP { |
| 213 | hll.ConvertToDense() |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | func parseOldTimeseriesHLLResult(buffer []byte, ignoreEnum bool) (AQLQueryResult, error) { |
| 218 | // empty result buffer |