paul8263 commented on code in PR #20343:
URL: https://github.com/apache/flink/pull/20343#discussion_r1089652422
##########
flink-connectors/flink-connector-kafka/src/test/java/org/apache/flink/streaming/connectors/kafka/table/ReducingUpsertWriterTest.java:
##########
@@ -261,6 +261,52 @@ public void testFlushDataWhenCheckpointing() throws
Exception {
compareCompactedResult(expected, writer.rowDataCollectors);
}
+ @Test
+ public void testWriteDataWithNullTimestamp() throws Exception {
+ final MockedSinkWriter writer = new MockedSinkWriter();
+ final ReducingUpsertWriter<?> bufferedWriter =
createBufferedWriter(writer);
+
+ bufferedWriter.write(
+ GenericRowData.ofKind(
+ INSERT,
+ 1001,
+ StringData.fromString("Java public for dummies"),
+ StringData.fromString("Tan Ah Teck"),
+ 11.11,
+ 11,
+ null),
+ new org.apache.flink.api.connector.sink2.SinkWriter.Context() {
+ @Override
+ public long currentWatermark() {
+ throw new UnsupportedOperationException("Not
implemented.");
+ }
+
+ @Override
+ public Long timestamp() {
+ return null;
+ }
+ });
+
+ bufferedWriter.flush(true);
+
+ HashMap<Integer, List<RowData>> expected = new HashMap<>();
Review Comment:
Thanks @zentol . I updated the code and please help review it again.
--
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]