yuxiqian commented on code in PR #3449:
URL: https://github.com/apache/flink-cdc/pull/3449#discussion_r1663358098
##########
flink-cdc-runtime/src/test/java/org/apache/flink/cdc/runtime/operators/transform/TransformDataOperatorTest.java:
##########
Review Comment:
I could still reproduce `testTimestampDiffTransform` failure when testing
time was set to June 1st 04:00. Seems month and year diff will not be 0 when 8
hours gap crossed month / year boundaries, where the output would be `-28800,
-480, -8, 0, [0 or -1], [0 or -1]`.
##########
flink-cdc-runtime/src/test/java/org/apache/flink/cdc/runtime/operators/transform/TransformDataOperatorTest.java:
##########
@@ -553,6 +562,26 @@ void testTimestampDiffTransform() throws Exception {
Assertions.assertThat(
transformFunctionEventEventOperatorTestHarness.getOutputRecords().poll())
.isEqualTo(new StreamRecord<>(insertEventExpect));
+
+ DataChangeEvent insertEvent2 =
+ DataChangeEvent.insertEvent(
+ TIMESTAMPDIFF_TABLEID,
+ recordDataGenerator.generate(
+ new Object[] {
+ new BinaryStringData("2"), null, null,
null, null, null, null
+ }));
+ DataChangeEvent insertEventExpect2 =
+ DataChangeEvent.insertEvent(
+ TIMESTAMPDIFF_TABLEID,
+ recordDataGenerator.generate(
+ new Object[] {
+ new BinaryStringData("2"), -28800, -480,
-8, 0, 0, 0
Review Comment:
Ditto.
--
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]