Skip to content

[Bug] [StarRocks] StarRocks JDBC Dialect confilect with StarRocks Connector #7551

@liunaijie

Description

@liunaijie

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

this pr #7294 added StarRocks JDBC dialect.

It will has some issue when both JDBC connector and StarRocks connector exist.

image

jdbc catalog will use dialect.dialectName() as factoryIdentifier to load Catalog. StarRocks catalog in created in StarRocks connector, so if StarRocks connector exist, it will read an error Catalog get ClassCastException exception

If not exist, it will use loading tables from jdbc directly, the e2e test case is work because of this.
image

Caused by: java.lang.ClassCastException: org.apache.seatunnel.connectors.seatunnel.starrocks.catalog.StarRocksCatalog cannot be cast to org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.AbstractJdbcCatalog

	at org.apache.seatunnel.connectors.seatunnel.jdbc.utils.JdbcCatalogUtils.getTables(JdbcCatalogUtils.java:75) ~[?:?]

SeaTunnel Version

dev

SeaTunnel Config

jdbc {
compatible_mode = "starrocks"
}

Running Command

rest api to submit job

Error Exception

Caused by: java.lang.ClassCastException: org.apache.seatunnel.connectors.seatunnel.starrocks.catalog.StarRocksCatalog cannot be cast to org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.AbstractJdbcCatalog

	at org.apache.seatunnel.connectors.seatunnel.jdbc.utils.JdbcCatalogUtils.getTables(JdbcCatalogUtils.java:75) ~[?:?]



### Zeta or Flink or Spark Version

_No response_

### Java or Scala Version

_No response_

### Screenshots

_No response_

### Are you willing to submit PR?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions