You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "ConeyLiu (via GitHub)" <gi...@apache.org> on 2023/06/16 14:32:50 UTC

[GitHub] [iceberg] ConeyLiu commented on a diff in pull request #7836: Flink: Key projection should be based on the requested Flink table schema

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


##########
flink/v1.17/flink/src/test/java/org/apache/iceberg/flink/SimpleDataUtil.java:
##########
@@ -349,7 +349,10 @@ public static void assertTableRecords(String tablePath, List<Record> expected, S
 
   public static StructLikeSet expectedRowSet(Table table, Record... records) {
     StructLikeSet set = StructLikeSet.create(table.schema().asStruct());
-    Collections.addAll(set, records);
+    InternalRecordWrapper wrapper = new InternalRecordWrapper(table.schema().asStruct());

Review Comment:
   `StructLikeSet ` use a `StructLikeWrapper` to wrap every input record, and it converts the TimeStamp record to long (Iceberg uses long to represent TimeStamp). So here we use `InternalRecordWrapper ` to convert the external StruckLike record to an internal record first.



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org