thswlsqls opened a new pull request, #16924: URL: https://github.com/apache/iceberg/pull/16924
Closes #16923 ## Summary - `SparkValueConverter.convertToSpark` returned a `new UnsupportedOperationException(...)` for `STRUCT`, `LIST`, and `MAP` instead of throwing it. - The method returns `Object`, so the exception flows downstream as a value into `lit(...)` and fails in a confusing place. - Throw it, matching the same method's `default` branch. - Code: `spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/SparkValueConverter.java`. ## Testing done - Added `TestSparkValueConverter#testConvertToSparkComplexTypesThrow` (STRUCT/LIST/MAP) — pure unit test, no SparkSession. Fails on the old `return`, passes with `throw`. - `:iceberg-spark:iceberg-spark-4.1_2.13:test --tests ...TestSparkValueConverter` and `spotlessCheck` — passed. - Skipped the full `:check` (heavy Spark integration suites); the one-keyword change on a static utility is covered by the unit test. --- **AI Disclosure** - Model: Claude Opus 4.8 - Platform/Tool: Claude Code - Human Oversight: fully reviewed - Prompt Summary: Find a mergeable contribution in the Spark v4.1 module, then implement and test it. The fix corrects exception handling in `SparkValueConverter.convertToSpark`. -- 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]
