Xin Chen created FLINK-40152:
--------------------------------
Summary: PostgreSQL CDC connector captures case-variant tables
when only one is specified
Key: FLINK-40152
URL: https://issues.apache.org/jira/browse/FLINK-40152
Project: Flink
Issue Type: Bug
Components: Flink CDC
Affects Versions: 3.0.0, 2.4.0
Reporter: Xin Chen
== Problem ==
When PostgreSQL has two tables with the same name but different cases (e.g.,
`mytable` and `MyTable`), specifying only one table in `table-name` causes
Flink CDC to capture BOTH tables.
== Root Cause ==
Debezium's `table.include.list` uses `Pattern.CASE_INSENSITIVE` for regex
matching by default (see `io.debezium.util.Strings#includes()`). This causes
`public.mytable` to also match `public.MyTable`.
The issue is in `TableDiscoveryUtils.listTables()`:
```java
Set<TableId> capturedTables =
allTableIds.stream()
.filter(t -> tableFilters.dataCollectionFilter().isIncluded(t))
.collect(Collectors.toSet());
--
This message was sent by Atlassian Jira
(v8.20.10#820010)