Documentation
¶
Index ¶
- func NewAnd(left, right Node) *nodeAnd
- func NewNAnd(negative, regular Node) *nodeNAnd
- func NewNot(child Node, minID, maxID LID) *nodeNot
- func NewOr(left, right Node) *nodeOr
- func NewRange(minVal, maxVal LID) *nodeRange
- func TreeFold[V any](op func(V, V) V, def V, values []V) V
- type BatchedNode
- type LID
- type LIDBatch
- type Node
- type Sourced
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BatchedNode ¶ added in v0.72.0
type LID ¶ added in v0.69.0
type LID struct {
// contains filtered or unexported fields
}
LID is an encoded representation of LID and reverse flag made specifically for fast compare operations.
For reverse order LID is inverted as follows: "MaxUint32 - LID" formula using XOR mask. Terminal LID value is 0 instead of MaxUint32 in reverse order, but 0 is XORed to MaxUint32. Which means, null value will always have lid field set to 0xFFFFFFFF (math.MaxUint32) regardless of reverse (order) flag.
func NewAscZeroLID ¶ added in v0.72.0
func NewAscZeroLID() LID
func NewDescLID ¶ added in v0.69.0
NewDescLID returns LIDs for desc sort order
func NewDescZeroLID ¶ added in v0.72.0
func NewDescZeroLID() LID
type LIDBatch ¶ added in v0.72.0
type LIDBatch struct {
// contains filtered or unexported fields
}
LIDBatch represents a batch of LIDs. lids are stored as uint32 slice and sorted in ascending order regardless of doc order. This allows to avoid copying and use reference to LID blocks data. Such batches are also logically immutable - we can't append or delete from them, only union or intersect. But we can zero out (reset) them.
func NewAscBatch ¶ added in v0.72.0
NewAscBatch creates a batch of lids for ASC docs order
func NewDescBatch ¶ added in v0.72.0
NewDescBatch creates a batch of lids for DESC docs order
type Node ¶
type Node interface {
fmt.Stringer // for testing
Next() LID
// NextGeq returns next greater or equal (GEQ) lid
NextGeq(nextID LID) LID
}
func BuildORTree ¶
func MakeStaticNodes ¶
MakeStaticNodes is currently used only for tests
type Sourced ¶
type Sourced interface {
fmt.Stringer // for testing
// aggregation need source
NextSourced() (id LID, source uint32)
NextSourcedGeq(nextLID LID) (id LID, source uint32)
}