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

   ### What changes were proposed in this pull request?
   
   This PR aims to support top-level `Decimal` decoding in 
`DataFrame.collect(as:)`.
   
   ### Why are the changes needed?
   
   Foundation's `Decimal.init(from:)` requests a keyed container of its 
internal fields. So, the following throws `ArrowError.invalid("Column for key 
\"exponent\" not found")`, while Scala `as[BigDecimal]` returns `1.50`.
   
   ```swift
   try await spark.sql("SELECT CAST(1.5 AS DECIMAL(10,2)) AS v").collect(as: 
Decimal.self)
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. `collect(as: Decimal.self)` and `collect(as: Decimal?.self)` now return 
values instead of throwing errors.
   
   ### How was this patch tested?
   
   Pass the CIs with the updated `CreateDataFrameTests.collectAsDecimal`.
   
   ### 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]

Reply via email to