deepujain opened a new pull request, #59028: URL: https://github.com/apache/spark/pull/59028
### What changes were proposed in this pull request? Replace `_LEGACY_ERROR_TEMP_2017` with `SparkException.internalError` when `UnresolvedMapObjects.dataType` is requested without an explicit collection class. Remove the unused legacy error entry and exercise the owning expression in `ObjectExpressionsSuite`. ### Why are the changes needed? [SPARK-43253](https://issues.apache.org/jira/browse/SPARK-43253) asks for an internal error when the legacy condition cannot be reproduced from user SQL. `UnresolvedMapObjects` is an analyzer placeholder: its input must resolve before analysis replaces it with `MapObjects`. The new diagnostic describes this unresolved state instead of treating it as a user-facing unsupported operation. The regression calls the actual placeholder's `dataType`; a second assertion preserves the explicit collection-class path. This does not claim a user-SQL reproduction. Previous attempts are [#40984](https://github.com/apache/spark/pull/40984) and [#54900](https://github.com/apache/spark/pull/54900), both closed. ### Does this PR introduce _any_ user-facing change? No expected change for valid analyzed expressions. An internal unresolved-expression access now reports `INTERNAL_ERROR` instead of `_LEGACY_ERROR_TEMP_2017`. ### How was this patch tested? Added a regression that fails against the original implementation with `SparkUnsupportedOperationException`, then passes with the internal-error factory. The same test verifies that an explicit collection class still returns its `ObjectType`. On Linux arm64 with Java 17, using the repository sbt launcher: - `catalyst/testOnly *ObjectExpressionsSuite`: 29 passed. - `core/testOnly *SparkThrowableSuite`: 38 passed, including error-catalog formatting and uniqueness. - `catalyst/scalastyle` and `catalyst/Test/scalastyle`: 0 errors and 0 warnings. - `git diff --check`: passed. Independent review found no remaining issue. The test JVM used `HEAP_SIZE=1g`; sbt used `-J-Xmx3072m -J-Xms512m -J-Xss4m`, two active processors, and serial task execution to fit the local container. Initial parallel compilation exceeded its memory limit. No build configuration is changed by this PR. All results above were repeated successfully after integrating current master `55bd2b643777918fe688e7bf498197e0c1ba17c6`. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: OpenAI Codex (GPT-6) **JIRA assignee for credit:** deepujain -- 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]
