ConeyLiu commented on code in PR #7836:
URL: https://github.com/apache/iceberg/pull/7836#discussion_r1240587225


##########
flink/v1.17/flink/src/test/java/org/apache/iceberg/flink/sink/TestDeltaTaskWriter.java:
##########
@@ -321,6 +322,53 @@ public void testPartitionedTableWithDataAndIdAsKey() 
throws IOException {
         "Should have expected records", expectedRowSet(createRecord(1, 
"aaa")), actualRowSet("*"));
   }
 
+  @Test
+  public void testEqualityColumnOnCustomPrecisionTSColumn() throws IOException 
{
+    Schema tableSchema =
+        new Schema(
+            required(3, "id", Types.IntegerType.get()),
+            required(4, "ts", Types.TimestampType.withZone()));
+    RowType flinkType =
+        new RowType(
+            false,
+            ImmutableList.of(
+                new RowType.RowField("id", new IntType()),
+                new RowType.RowField("ts", new LocalZonedTimestampType(3))));
+
+    initTable(create(tableSchema, PartitionSpec.unpartitioned()));
+
+    List<Integer> equalityIds = 
ImmutableList.of(table.schema().findField("ts").fieldId());
+    TaskWriterFactory<RowData> taskWriterFactory = 
createTaskWriterFactory(flinkType, equalityIds);
+    taskWriterFactory.initialize(1, 1);
+
+    TaskWriter<RowData> writer = taskWriterFactory.create();
+    RowDataSerializer serializer = new RowDataSerializer(flinkType);
+
+    OffsetDateTime start = OffsetDateTime.now();
+    writer.write(createBinaryRowData(serializer, RowKind.INSERT, 1, start));
+    writer.write(createBinaryRowData(serializer, RowKind.INSERT, 2, 
start.plusSeconds(1)));
+

Review Comment:
   Removed



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to