You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "felipecrv (via GitHub)" <gi...@apache.org> on 2023/02/06 17:26:17 UTC

[GitHub] [arrow] felipecrv commented on a diff in pull request #14223: GH-32949: [Go] REE Array IPC read/write

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


##########
go/arrow/array/encoded.go:
##########
@@ -68,6 +70,102 @@ 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.
+//
+// Example
+//
+// For this array:
+//     RunEndEncoded: { Offset: 150, Length: 1500 }
+//         RunEnds: [ 1, 2, 4, 6, 10, 1000, 1750, 2000 ]
+//         Values:  [ "a", "b", "c", "d", "e", "f", "g", "h" ]
+//
+// LogicalValuesArray will return the following array:

Review Comment:
   The C++ implementation has an iterator class that allows a zero-copy iteration over the runs that match the logical `(offset, length)` slice. Do you have a similar thing in Go or is this function used instead?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org