eskabetxe commented on code in PR #3282:
URL: https://github.com/apache/flink-cdc/pull/3282#discussion_r1624721302
##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-postgres-cdc/src/main/java/org/apache/flink/cdc/connectors/postgres/source/fetch/PostgresScanFetchTask.java:
##########
@@ -280,12 +282,18 @@ private void createDataEventsForTable(
snapshotSplit.splitId(),
table.id());
+ List<String> uuidFields =
+ snapshotSplit.getSplitKeyType().getFieldNames().stream()
+ .filter(field ->
table.columnWithName(field).typeName().equals("uuid"))
+ .collect(Collectors.toList());
+
final String selectSql =
PostgresQueryUtils.buildSplitScanQuery(
snapshotSplit.getTableId(),
snapshotSplit.getSplitKeyType(),
snapshotSplit.getSplitStart() == null,
- snapshotSplit.getSplitEnd() == null);
+ snapshotSplit.getSplitEnd() == null,
+ uuidFields);
Review Comment:
I will need to pass the Table field, and that will also force me to change
`PostgresChunkSplitter.buildSplitScanQuery` or create a new method specific
this logic.
Current I'm overloading the method to only have to change here..

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]