[ https://issues.apache.org/jira/browse/FLINK-31553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17706276#comment-17706276 ]
Marios Trivyzas commented on FLINK-31553: ----------------------------------------- Yep, I agree, we need to keep the URL based discovery for a Dialect -> Catalog -> TypeMapping, etc. not only for compatibility reasons, but also for ease of use, since with `jdbc:postgresql` a user would expect to get the PGDialect by default. And on top add a mechanism like a config param that you've mentioned to be able to use the same driver but different Dialect->Catalog->etc. > Choose Catalog, non-url based > ----------------------------- > > Key: FLINK-31553 > URL: https://issues.apache.org/jira/browse/FLINK-31553 > Project: Flink > Issue Type: Improvement > Components: Connectors / JDBC > Reporter: Marios Trivyzas > Priority: Major > > Currently. the {*}Catalog{*}{*}/Dialect{*} (etc.) is chosen automatically > based on the URL provided. This takes place in > {*}{color:#000000}JdbcDialectFactory{color}#load{*}, using the: > {*}{color:#000000}JdbcDialectFactory{color}#acceptsURL{*}, so for a URL > *jdbc:postgresql://...* the PostgresCatalog/Dialect is used. *CrateDB* used > the same driver and URL but needs it's own Catalog/Dialect (etc.) as it has > it's own stack of internal tables, type sytem, etc. (see > https://issues.apache.org/jira/browse/FLINK-31551) So if a user wants to use > *CrateDB,* currently, needs to use the legacy CrateDB driver which uses the > jdbc:crate://... url. > Ideally, there should be another way, not only url based, that allows the > user to use a given url, but choose the dialect manually. It could be some > parameter on the catalog definition or even a special URL parameter like > *?dialect=CrateDB* or so. > > Other DBs that use implement the PostgreSQL wire protocol and are compatible > with the PostgreSQL JDBC driver, but need their own Catalog/Dialect etc. > would benefit from this. (e.g.: CockroachDB) > -- This message was sent by Atlassian Jira (v8.20.10#820010)