hcrosse opened a new issue, #1459:
URL: https://github.com/apache/arrow-go/issues/1459

   ### Describe the enhancement requested
   
   `starts_with` in https://github.com/apache/arrow-go/pull/1448 rejects 
`string_view` and `binary_view` input. Callers must cast the column to `string` 
or `binary` before checking a prefix.
   
   I propose a direct kernel that reads the 16 byte `arrow.ViewHeader`. Its 
length, inline bytes and 4 byte prefix can often decide the result without 
reading a data buffer. This avoids casting the whole column.
   
   Casting would work: the `cast` meta function already coalesces views with 
multiple data buffers. The direct path can reuse `coalesceMultiBufferViewDatum` 
before execution for those inputs, because `ArraySpan` has only three buffer 
slots and otherwise panics in `SetMembers`:
   
   
https://github.com/apache/arrow-go/blob/dcc21d491472b130b3e9bc01db80cfc1db254e62/arrow/compute/cast.go#L56-L76
   
   
https://github.com/apache/arrow-go/blob/dcc21d491472b130b3e9bc01db80cfc1db254e62/arrow/compute/exec/span.go#L495-L529
   
   Arrow C++ does not support these inputs yet. 
https://github.com/apache/arrow/issues/50478 tracks view support for string 
predicates, including `starts_with`. 
https://github.com/apache/arrow-rs/pull/6231 added view prefix matching for 
`LIKE` patterns in arrow-rs.
   
   I can open a PR once https://github.com/apache/arrow-go/pull/1448 merges.
   
   ### Component(s)
   
   Other
   
   


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