itinycheng / flink-connector-clickhouse

Flink SQL connector for ClickHouse. Support ClickHouseCatalog and read/write primary data, maps, arrays to clickhouse.
Apache License 2.0
346 stars 148 forks source link

[Enhance]: Ensure Consistency of Database and Parameters in Newly Created ClickHouse JDBC Connections #142

Open itinycheng opened 1 week ago

itinycheng commented 1 week ago

What happened?

Description

Issue

We need to ensure that the newly created connections contain the same database and parameters as the input URL. This means we need to append [/<database>][?param1=value1&param2=value2][#tag1,tag2,...] to the new URL.

Proposed Solution

We propose to modify the URL creation logic to ensure that the database and parameters from the original URL are included in the URLs for each shard. This will ensure consistency across all connections.

Impact

This change will improve the consistency of our connections and prevent potential issues caused by discrepancies in the database or parameters used in different connections.

Affects Versions

master

What are you seeing the problem on?

Connector Connection

How to reproduce

No response

Relevant log output

No response

Anything else

related to https://github.com/itinycheng/flink-connector-clickhouse/issues/129

Are you willing to submit a PR?

Code of Conduct

itinycheng commented 1 week ago

@czy006 Do you have any opinion about this issue?

czy006 commented 1 week ago

Agreed. I will assist with the code review @itinycheng