dongjoon-hyun opened a new pull request, #583:
URL: https://github.com/apache/spark-connect-swift/pull/583

   ### What changes were proposed in this pull request?
   
   This PR fixes `DataFrame.collect()` to read `BINARY` column values directly 
from `BinaryArray` as `Data`, instead of going through `BinaryArray.asString` 
and returning a `String.UTF8View`. `Row` equality now also compares `Data` 
values.
   
   ### Why are the changes needed?
   
   `BinaryArray.asString` force-unwraps `String(data:encoding: .utf8)`, so 
collecting any binary value that is not valid UTF-8 (e.g. `X'FF00FE'`) crashes 
the process. Returning `Data` also matches PySpark, which returns `bytearray`.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. `BINARY` values in collected rows are now `Data` instead of 
`String.UTF8View`, and non-UTF-8 binary values no longer crash.
   
   ### How was this patch tested?
   
   Pass the CIs with the newly added test cases.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Sonnet 5.5


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to