pitrou commented on code in PR #14223:
URL: https://github.com/apache/arrow/pull/14223#discussion_r1092156896


##########
go/arrow/array/encoded.go:
##########
@@ -68,6 +69,65 @@ func (r *RunEndEncoded) Release() {
        r.ends.Release()
 }
 
+// LogicalValuesArray returns an array holding the values of each
+// run, only over the range of run values inside the logical offset/length
+// range of the parent array.
+//
+// The return from this needs to be Released
+func (r *RunEndEncoded) LogicalValuesArray() arrow.Array {
+       physOffset := r.GetPhysicalOffset()
+       physLength := r.GetPhysicalLength()
+       data := NewSliceData(r.data.Children()[1], int64(physOffset), 
int64(physOffset+physLength))
+       defer data.Release()
+       return MakeFromData(data)
+}
+
+// LogicalRunEndsArray returns an array holding the logical indexes
+// of each run end, only over the range of run end values relative
+// to the logical offset/length range of the parent array.
+//
+// For arrays with an offset, this is not a slice of the existing
+// internal run ends array.
+//
+// The return from this needs to be Released
+func (r *RunEndEncoded) LogicalRunEndsArray(mem memory.Allocator) arrow.Array {

Review Comment:
   Can you add tests for this and `LogicalValuesArray`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to