Documentation
¶
Index ¶
- type Block
- func (b *Block) Add(key, value []byte) error
- func (b *Block) Count() int
- func (b *Block) Decode(r io.Reader) error
- func (b *Block) Encode(w io.Writer) error
- func (b *Block) Finalize() error
- func (b *Block) Get(key []byte) ([]byte, error)
- func (b *Block) ID() string
- func (b *Block) MaxKey() string
- func (b *Block) MinKey() string
- func (b *Block) Reader() io.Reader
- func (b *Block) Size() int
- func (b *Block) String() string
- type CompressionType
- type DataType
- type Header
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct {
Header Header
Stats Stats
Data []byte
// contains filtered or unexported fields
}
Block represents a single columnar block on disk. Layout: Header Stats [Data]
type CompressionType ¶
type CompressionType uint8
CompressionType defines the compression algorithm used.
const ( CompressionNone CompressionType = iota CompressionLZ4 )
type Header ¶
type Header struct {
DataType DataType
CompressionType CompressionType
Count uint32 // Number of values in the block
RawSizeBytes uint32 // Size of the data in bytes before compression
StoredSizeBytes uint32 // Size of the data in bytes after compression
CreatedAt int64 // Unix timestamp when the block was created
BlockID [32]byte // SHA-256 hash of the block contents
}
Header defines the metadata for a column block. It's a fixed-size structure.
type Stats ¶
type Stats struct {
Min, Max uint64 // Using uint64 to generically represent min/max for numeric types
MinKey []byte // Minimum key in the block
MaxKey []byte // Maximum key in the block
}
Stats stores summary statistics for the data in the block. This is used for query optimization (e.g., predicate pushdown).
Click to show internal directories.
Click to hide internal directories.