gustavodemorais commented on code in PR #351:
URL:
https://github.com/apache/flink-connector-kafka/pull/351#discussion_r4641748142
##########
flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/UpsertKafkaDynamicTableFactory.java:
##########
@@ -254,6 +258,35 @@ public DynamicTableSink createDynamicTableSink(Context
context) {
tableOptions.get(TRANSACTION_NAMING_STRATEGY));
}
+ private static boolean supportsKeyOnlyDeletes(
+ ReadableConfig tableOptions, ResolvedSchema schema) {
+ return writesToSingleTopic(tableOptions) &&
hasOnlyNullableValueColumns(schema);
+ }
+
+ /**
+ * A tombstone only needs the key, as long as the sink knows the target
topic. With a topic list
+ * or pattern, each row picks its topic from the {@code topic} metadata
column, which a key-only
+ * delete does not guarantee to carry. This makes sinks writing to
multiple topics incompatible
+ * with key-only deletes.
+ */
+ private static boolean writesToSingleTopic(ReadableConfig tableOptions) {
Review Comment:
good pointer. will do
##########
flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/UpsertKafkaDynamicTableFactoryTest.java:
##########
Review Comment:
Sounds good. Adding it
--
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]