dongjoon-hyun opened a new pull request, #556: URL: https://github.com/apache/spark-connect-swift/pull/556
### What changes were proposed in this pull request? This PR aims to support upcasts from integral types to `Float` and `Double` in `DataFrame.collect(as:)`. The rule follows Apache Spark's numeric precedence (`Byte < Short < Int < Long < Float < Double`). These conversions still throw `ArrowError`, as in Scala `Dataset.as[T]`: - `DOUBLE` into `Float` - floating-point types into integral types - `DECIMAL` into `Float` or `Double` - integral types into `Bool` - `STRING` into numeric types ### Why are the changes needed? To match Scala `Dataset.as[T]`. For example, `SELECT 30 AS v` decodes into a `Double` field in Scala, but Swift threw `Cannot decode Double for v`. ### Does this PR introduce _any_ user-facing change? No behavior change. Previous it throws an error. ### 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 Opus 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]
