[ https://issues.apache.org/jira/browse/FLINK-31553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17705877#comment-17705877 ]
João Boto commented on FLINK-31553: ----------------------------------- Hi [~matriv], I'm not an expert on those databases, but being compatible with Postgres driver, shouldn't the current implementation work? Or we must use a specific driver for each database? In case that we need to use an CrateDB driver (or CockroachDB driver) being the url with postgres, I think that the option to have an property that indicates the dialect should be fine but we should open a FLIP ([~martijnvisser] this is the correct way no?) I would say that a new connection config like "connector.dialect" should fit, and on JdbcDialectFactory use this config or by default use the acceptUrl, some checks must be implemented to not break the current implementation (maybe define a default implementation or something like that, as multiple postgres acceptUrl could exist) But this must be discussed, as there may be a potential compatibility gap. > 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)