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

   ### What changes were proposed in this pull request?
   
   This PR aims to fix `MergeIntoWriter.update` to pass the given column 
assignments (`map`) to `buildMergeAction`.
   
   ### Why are the changes needed?
   
   Previously, `update(_:_:_:)` called `buildMergeAction(ActionType.update, 
condition)` without `map`, so `assignments` silently defaulted to `[:]`. As a 
result, the `UPDATE` merge action was sent to the server without any 
assignments, and `whenMatched().update(map:)` and 
`whenNotMatchedBySource().update(map:)` ignored the user-provided assignments. 
In contrast, `insert(_:_:)` passes `map` correctly.
   
   ```swift
   await mergeInto.whenMatched().update(map: ["t.v": "s.v"])  // assignments 
were dropped
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. `whenMatched().update(map:)` and 
`whenNotMatchedBySource().update(map:)` now send the given column assignments 
as intended.
   
   ### How was this patch tested?
   
   Pass the CIs with the newly added test case, 
`MergeIntoWriterTests.updateAssignments`. It checks the built 
`MergeIntoTableCommand` and does not need a Spark Connect server.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 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