wangzhigang1999 commented on PR #7419: URL: https://github.com/apache/kyuubi/pull/7419#issuecomment-4343492776
You're right, and I want to walk back my earlier claim that the substitution is required. I tested this end-to-end against master (without this PR) using DBeaver and a real MySQL backend, and traced what actually triggers the bug: On master, `MySQLDialect` does not override `getCatalogsOperation` / `getSchemasOperation`, so the `JdbcDialect` defaults take over and throw `KyuubiSQLException.featureNotSupported()`. The result on the wire (DBeaver metadata refresh): ``` -- Load catalogs → throws featureNotSupported -- Load schemas → throws featureNotSupported -- Load tables [null, null, %, null] ← falls back to "give me everything" -- Load type info ``` So the root cause of KYUUBI-7305 is that DBeaver fails to obtain a database list and falls back to `getTables(null, null, ...)`, which Hive client rewrites to schemaPattern=`"%"` and the engine treats per spec as "all schemas". On the same setup with this PR applied, DBeaver gets a real catalog/schema list and switches to issuing scoped calls like `getTables(null, "dataeye_starpony", "%", null)` on its own — no engine-side substitution needed. That makes the `effectiveDatabase` substitution in this PR redundant in practice — your spec interpretation is correct, and the fix users actually need is the `getCatalogsOperation` / `getSchemasOperation` implementations plus `setSchema` at session open. I'll drop the substitution layer and keep the rest, then we can move on to the dialect-API refactor you outlined as the proper follow-up. Apologies for the runaround on this thread. -- 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]
