cobed95 commented on code in PR #4945:
URL: https://github.com/apache/polaris/pull/4945#discussion_r3510874198
##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/QueryGenerator.java:
##########
@@ -422,8 +438,7 @@ public static PreparedQuery generateOverlapQuery(
return new PreparedQuery(query.sql(), where.parameters());
}
- static String getFullyQualifiedTableName(String tableName) {
- // TODO: make schema name configurable.
- return "POLARIS_SCHEMA." + tableName;
+ String getFullyQualifiedTableName(String tableName) {
+ return schemaName + "." + tableName;
Review Comment:
It seems that quoting + casing behaviour is different for each DBMS. For
example PostgreSQL and CockroachDB assumes lowercase, H2 assumes uppercase, and
MySQL as you've mentioned behaves in a totally different way (it depends on the
underlying OS + user configurations). In fact, for MySQL, the database acts as
a schema, so it may even be possible to drop the notion of a `schema` and just
use the database specified in the JDBC URL when supporting MySQL. (Please
correct me if I'm wrong.)
That said, since the schema case handling is already different between
Postgres/CockroachDB and H2, I would like to gently propose to keep the
unquoted behaviour to avoid breaking existing deployments. In this case the
users need to be wary of the default case handling behaviour of unquoted schema
names of their chosen DBMS. Clear documentation should be added as well.
--
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]