yyanyy commented on a change in pull request #1975:
URL: https://github.com/apache/iceberg/pull/1975#discussion_r552344800
##########
File path: core/src/main/java/org/apache/iceberg/DataFiles.java
##########
@@ -268,6 +271,11 @@ public Builder
withEncryptionKeyMetadata(EncryptionKeyMetadata newKeyMetadata) {
return withEncryptionKeyMetadata(newKeyMetadata.buffer());
}
+ public Builder withSortOrderId(int newSortOrderId) {
Review comment:
I think if we change this to `withSortOrder` that,
[`copy()`](https://github.com/apache/iceberg/pull/1975/files#diff-ac5b4d1edab36f13fd929683cad0f56951ac019353354ac886e84d099d5dd219R179)
of this Builder might have problem since `DataFile` only has `sortOrderId()`
but no `sortOrder()` so we couldn't copy directly; we probably also couldn't
add `sortOrder()` to `ContentFile`/`DataFile` since the file created from Avro
reflection will not have the struct without looking up table metadata? But if
we add both `withSortOrder` and `withSortOrderId` here, and `withSortOrder`
only extract the id to store, then it will definitely be more convenient. I'll
update to do that but please let me know if I didn't understand correctly!
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]