package encoded
Import Path
github.com/apache/arrow-go/v18/arrow/encoded (on go.dev)
Dependency Relation
imports 3 packages, and imported by 2 packages
Involved Source Files
ree_utils.go
Package-Level Type Names (only one)
MergedRuns is used to take two Run End Encoded arrays and iterate
them, finding the correct physical indices to correspond with the
runs.
AccumulatedRunLength returns the logical run end of the current merged run.
IndexIntoArray is like IndexIntoBuffer but it doesn't take into account
the array offset and instead is the index that can be used with the .Value
method on the array to get the correct value.
IndexIntoBuffer returns the physical index into the value buffer of
the passed in array index (ie: 0 for the first array and 1 for the second)
this takes into account the offset of the array so it is the true physical
index into the value *buffer* in the child.
Next returns true if there are more values/runs to iterate and false
when one of the arrays has reached the end.
RunLength returns the logical length of the current merged run being looked at.
*MergedRuns : github.com/apache/arrow-go/v18/arrow/compute/exec.ArrayIter[bool]
func NewMergedRuns(inputs [2]arrow.Array) *MergedRuns
Package-Level Functions (total 4)
FindPhysicalIndex performs a binary search on the run-ends to return
the appropriate physical offset into the values/run-ends that corresponds
with the logical index provided when called. If the array's logical offset
is provided, this is equivalent to calling FindPhysicalOffset.
For example, an array with run-ends [10, 20, 30, 40, 50] and a logicalIdx
of 25 will return the value 2. This returns the smallest offset
whose run-end is greater than the logicalIdx requested, which would
also be the index into the values that contains the correct value.
This function assumes it receives Run End Encoded array data
FindPhysicalOffset performs a binary search on the run-ends to return
the appropriate physical offset into the values/run-ends that corresponds
with the logical offset defined in the array.
For example, an array with run-ends [10, 20, 30, 40, 50] and a logical
offset of 25 will return the value 2. This returns the smallest offset
whose run-end is greater than the logical offset, which would also be the
offset index into the values that contains the correct value.
This function assumes it receives Run End Encoded array data
GetPhysicalLength returns the physical number of values which are in
the passed in RunEndEncoded array data. This will take into account
the offset and length of the array as reported in the array data
(so that it properly handles slices).
This function assumes it receives Run End Encoded array data
NewMergedRuns takes two RunEndEncoded arrays and returns a MergedRuns
object that will allow iterating over the physical indices of the runs.
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |