vamshikrishnakyatham opened a new pull request, #14118: URL: https://github.com/apache/hudi/pull/14118
### Describe the issue this Pull Request addresses When executing a `MERGE INTO` statement against a non-existent target table, Hudi produces a misleading `UNRESOLVED_COLUMN` error instead of the correct `TABLE_OR_VIEW_NOT_FOUND` error. This happens because the analysis rule attempts to resolve column references before validating that the target table actually exists, leading to confusing error messages for users. This PR fixes the issue by adding an early check in the ResolveReferences analysis rule to validate table existence before attempting column resolution. fixes: https://github.com/apache/hudi/issues/14117 ### Summary and Changelog Modified ResolveReferences rule in `HoodieSparkBaseAnalysis.scala` to check if the resolved target table is an UnresolvedRelation before proceeding with column resolution and added explicit `TABLE_OR_VIEW_NOT_FOUND` error with helpful diagnostic message when target table doesn't exist ### Impact Improved error messages - users will see more accurate and actionable error messages. ### Risk Level none ### Documentation Update none ### Contributor's checklist - [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [x] Enough context is provided in the sections above - [x] Adequate tests were added if applicable -- 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]
