dongjoon-hyun opened a new pull request, #533:
URL: https://github.com/apache/spark-connect-swift/pull/533
### What changes were proposed in this pull request?
This PR aims to support the `broadcast` function.
```swift
public func broadcast(_ df: DataFrame) async -> DataFrame
```
Unlike most functions in `Functions.swift`, `broadcast` takes a `DataFrame`
and returns a
`DataFrame` marked with a `broadcast` join hint, mirroring PySpark's
`broadcast(df) -> df.hint("broadcast")` and Scala's
`def broadcast[U](df: Dataset[U]): df.type`.
### Why are the changes needed?
For feature parity with Apache Spark. `broadcast` has been available since
Apache Spark 1.6.0
in PySpark and is a commonly used hint for broadcast hash joins.
### Does this PR introduce _any_ user-facing change?
Yes, this PR adds a new public function, `broadcast`.
```swift
let joined = await left.join(broadcast(right), "id")
```
### How was this patch tested?
Pass the CIs with the newly added test cases in `FunctionsTests`.
### 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]