zeroshade commented on code in PR #34079:
URL: https://github.com/apache/arrow/pull/34079#discussion_r1100649462


##########
go/arrow/scalar/scalar_test.go:
##########
@@ -1416,3 +1427,56 @@ func TestUnionScalars(t *testing.T) {
        suite.Run(t, new(SparseUnionSuite))
        suite.Run(t, new(DenseUnionSuite))
 }
+
+func TestRunEndEncodedGetScalar(t *testing.T) {
+       mem := memory.NewCheckedAllocator(memory.DefaultAllocator)
+       defer mem.AssertSize(t, 0)
+
+       runEnds, _, _ := array.FromJSON(mem, arrow.PrimitiveTypes.Int32, 
strings.NewReader(`[100, 200, 300, 400, 500]`))
+       defer runEnds.Release()
+
+       values, _, _ := array.FromJSON(mem, arrow.BinaryTypes.String, 
strings.NewReader(`["Hello", "beautiful", "world", "of", "RLE"]`))
+       defer values.Release()
+
+       reeArray := array.NewRunEndEncodedArray(runEnds, values, 500, 0)
+       defer reeArray.Release()

Review Comment:
   `FromJSON` was already implemented for REE, and like dictionary arrays, REE 
arrays are expected to be expanded in the JSON. Processing the JSON will encode 
it into run-end-encoding



-- 
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