suryaprasanna opened a new pull request, #17937: URL: https://github.com/apache/hudi/pull/17937
### Describe the issue this Pull Request addresses When Hive sync is enabled, the code attempts to register inferred schema in Hive Metastore without verifying that HiveSyncTool is actually configured as one of the sync client tools. This can lead to unnecessary work or potential issues when HiveSyncTool is not intended to be used. ### Summary and Changelog Added a validation check to ensure HiveSyncTool is in the configured list of sync client tool classes before calling `registerInferredSchemaInHMSIfRequired()`. **Changes:** - Added new `schemaSync()` method in `HoodieSparkSqlWriterInternal` that checks if `HiveSyncTool` is in the sync client tool classes list before registering schema - The check prevents unnecessary schema registration when HiveSyncTool is not configured ### Impact This change prevents potential issues when Hive sync is enabled but HiveSyncTool is not configured in the sync client tools list. It adds a safety check before performing Hive Metastore operations. ### Risk Level **low** - This change adds a validation check that prevents code from running when it shouldn't. It doesn't change existing behavior when HiveSyncTool is properly configured. ### 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 - [ ] 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]
