dictionarySize is the estimated total size of a compressed dictionary for this attribute.
()
| 630 | |
| 631 | // dictionarySize is the estimated total size of a compressed dictionary for this attribute. |
| 632 | func (c cardinality) dictionarySize() uint64 { |
| 633 | total := uint64(0) |
| 634 | for v := range c { |
| 635 | total += 4 + uint64(len(v)) // 32-bit length, plus the value itself |
| 636 | } |
| 637 | return total |
| 638 | } |
| 639 | |
| 640 | // avgSizePerRowGroup is the average number of bytes used for this attribute per row group, assuming a |
| 641 | // compressed dictionary and page content of 1 byte per row. |