linliu-code opened a new issue, #20235: URL: https://github.com/apache/hudi/issues/20235
When a table's `hoodie.properties` has no `hoodie.database.name` (for example, a table written through the Spark datasource without that option and registered in a catalog later), `HoodieFileIndex.getConfigProperties` guesses the database from the session's current database and calls `spark.catalog.tableExists(guessedDb, tableName)` to merge catalog table properties. That merge is best-effort, but the catalog call is not guarded. With a session catalog whose `tableExists` throws for the guessed identifier (for example, a catalog that rejects the `default` database), a fully qualified read such as `SELECT * FROM db1.tbl` fails during planning, even though the query names the database and the table resolves. `USE db1` before the same query works, because the guess then happens to be right. Expected: a failure to resolve a guessed database should not fail the read; the catalog properties merge should be skipped with a warning. When the database is recorded in `hoodie.properties`, behaviour should stay as it is. -- 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]
