-
Couldn't load subscription status.
- Fork 56
fixed splitting records by database from topic name #588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,30 @@ | ||||
| package com.clickhouse.kafka.connect.sink.data.convert; | ||||
|
|
||||
| import org.junit.jupiter.params.ParameterizedTest; | ||||
| import org.junit.jupiter.params.provider.MethodSource; | ||||
|
|
||||
| import java.util.regex.Pattern; | ||||
|
|
||||
| import static org.junit.Assert.assertEquals; | ||||
|
|
||||
| class RecordConvertorTest { | ||||
|
|
||||
| @ParameterizedTest | ||||
| @MethodSource("splitDBTopicProvider") | ||||
| void splitDBTopic(String topic, String dbTopicSeparatorChar, String database) { | ||||
|
|
||||
| String[] parts = topic.split(Pattern.quote(dbTopicSeparatorChar)); | ||||
| String actualDatabase = parts[0]; | ||||
| String actualTopic = parts[1]; | ||||
| System.out.println("actual_topic: " + actualTopic); | ||||
|
||||
| System.out.println("actual_topic: " + actualTopic); |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -12,12 +12,14 @@ | |||
| import com.clickhouse.client.api.query.QuerySettings; | ||||
| import com.clickhouse.client.api.query.Records; | ||||
| import com.clickhouse.data.ClickHouseFormat; | ||||
| import com.clickhouse.kafka.connect.sink.ClickHouseSinkConfig; | ||||
|
||||
| import com.clickhouse.kafka.connect.sink.ClickHouseSinkConfig; |
Copilot
AI
Sep 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import is unused and appears to be accidentally added. The jdk.dynalink.Operation class is not used anywhere in this file.
| import jdk.dynalink.Operation; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon or line break between the two assertions. This should be split into two separate statements for proper formatting and readability.