yihua opened a new pull request, #14175: URL: https://github.com/apache/hudi/pull/14175
### Describe the issue this Pull Request addresses When creating an external table using the following CREATE TABLE SQL statement on Spark, the table config file `.hoodie/hoodie.properties` is updated with additional table configs, `hoodie.table.create.schema` and `hoodie.database.name`. However, these two table configs are not needed for an external table, especially for reading the table only. Updating the table config requires write access which is not needed for read-only case, causing confusion to users. ``` CREATE TABLE IF NOT EXISTS table_name USING hudi LOCATION '<table_base_path>' ``` ### Summary and Changelog This PR fixes the issue above, to only update the table config during executing CREATE TABLE SQL statement if the table's base path exists and the intention is to create a managed table. A new test is added to validate the change. ### Impact Improves CREATE TABLE SQL experience. ### Risk Level low ### Documentation Update N/A ### Contributor's checklist - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [ ] 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]
