This is an automated email from the ASF dual-hosted git repository.
dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 8a87b5d [INLONG-2148] Fix the problem that the pattern used for
extracting clickhouse metadata is not compatible with some versions of
clickhouse (#2149)
8a87b5d is described below
commit 8a87b5d88a5d94168072f82ce44aaaa36c401357
Author: TianqiWan <[email protected]>
AuthorDate: Thu Jan 13 12:48:58 2022 +0800
[INLONG-2148] Fix the problem that the pattern used for extracting
clickhouse metadata is not compatible with some versions of clickhouse (#2149)
Co-authored-by: tianqiwan <[email protected]>
---
.../sort/flink/clickhouse/output/ClickHouseShardOutputFormat.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/flink/clickhouse/output/ClickHouseShardOutputFormat.java
b/inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/flink/clickhouse/output/ClickHouseShardOutputFormat.java
index 0138988..c0534f7 100644
---
a/inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/flink/clickhouse/output/ClickHouseShardOutputFormat.java
+++
b/inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/flink/clickhouse/output/ClickHouseShardOutputFormat.java
@@ -46,8 +46,8 @@ public class ClickHouseShardOutputFormat extends
AbstractClickHouseOutputFormat
private static final Logger LOG =
LoggerFactory.getLogger(ClickHouseShardOutputFormat.class);
- private static final Pattern PATTERN =
Pattern.compile("Distributed\\((?<cluster>[a-zA-Z_][0-9a-zA-Z_]*),"
- +
"\\s*(?<database>[a-zA-Z_][0-9a-zA-Z_]*),\\s*(?<table>[a-zA-Z_][0-9a-zA-Z_]*)");
+ private static final Pattern PATTERN =
Pattern.compile("Distributed\\('?(?<cluster>[a-zA-Z_][0-9a-zA-Z_]*)'?,"
+ +
"\\s*'?(?<database>[a-zA-Z_][0-9a-zA-Z_]*)'?,\\s*'?(?<table>[a-zA-Z_][0-9a-zA-Z_]*)'?");
private final ClickHouseConnectionProvider connectionProvider;