huaxingao opened a new pull request, #50275:
URL: https://github.com/apache/spark/pull/50275
### What changes were proposed in this pull request?
Since both `commandOptions` and `dsOptions` are `CaseInsensitiveStringMap`
objects, I think we should convert the keys and values to lowercase before
comparing them
### Why are the changes needed?
In iceberg/spark4.0 integration, I got a few assertion errors:
```
assertion failed
java.lang.AssertionError: assertion failed
at scala.Predef$.assert(Predef.scala:264)
at
org.apache.spark.sql.execution.datasources.v2.V2Writes$.org$apache$spark$sql$execution$datasources$v2$V2Writes$$mergeOptions(V2Writes.scala:128)
```
The assertion error occurs when comparing commandOptions and dsOptions; the
cases of the keys don't match.
```
assert(commandOptions == dsOptions)
```
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
I have verified that the iceberg tests can pass with this fix.
### Was this patch authored or co-authored using generative AI tooling?
no
--
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]