hcrosse opened a new pull request, #1490:
URL: https://github.com/apache/arrow-go/pull/1490

   ### Rationale for this change
   
   Extracting, casting and computing on `string_view` and `binary_view` values 
fails or panics because `arrow/scalar` has no types for them.
   
   ### What changes are included in this PR?
   
   `GetScalar` copies view value bytes. `MakeArrayFromScalar` copies an 
out-of-line value once into the caller's allocator, following the copy policy 
in:
   
   https://github.com/apache/arrow-go/pull/1139
   
   Expression strings print view literals the way they print `utf8` and 
`binary` literals. C++ doesn't do that for view literals. `list_element` still 
rejects view outputs.
   
   ### Are these changes tested?
   
   The expanded `TestBinaryLikeToBinaryView`, `TestBinaryViewToBinaryLike`, 
`TestBinaryViewToBinaryView` and `TestStartsWith` fail or crash on `main`. 
`TestGetScalarViews` checks copying. `TestMakeArrayFromViewScalar` checks array 
conversion. `TestArraySpan_FillFromScalarRoundTripsViews` checks round trips.
   
   On macOS arm64 with Go 1.26.10, `go test ./arrow/...` with arrow-testing and 
parquet-testing checked out, `-race -tags assert,test` tests, vet, lint and the 
Release Audit Tool passed.
   
   ### Are there any user-facing changes?
   
   Yes. `arrow/scalar` adds `StringView`, `BinaryView`, `NewStringViewScalar`, 
`NewStringViewScalarFromBuffer` and `NewBinaryViewScalar`. `MakeScalarParam` 
with a view type returns these types instead of `String` or `Binary`.
   
   Closes https://github.com/apache/arrow-go/issues/1489.
   


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