szehon-ho commented on code in PR #5376:
URL: https://github.com/apache/iceberg/pull/5376#discussion_r944972504
##########
core/src/main/java/org/apache/iceberg/BaseFilesTable.java:
##########
@@ -185,5 +232,60 @@ public Iterable<FileScanTask> split(long splitSize) {
ManifestFile manifest() {
return manifest;
}
+
+ private List<Function<ContentFile<?>, Object>> accessors(boolean
partitioned) {
Review Comment:
I gave a try but there are two issues:
1. BaseFile::size() returns a fixed size (DataFile.getType()), regardless
of the projection schema. I guess this can be fixed, but hopefully doesnt
break anything.
2. A more serious issue, BaseFile has a field called 'fileOrdinal', but it
is not on the FilesTable schemas (again DataFile.getType()). It seems its
working today because its the last field, and projection on the table will
never request that field.
To me a list of explicit accessors for this table is better as it decouples
the table from the messiness of the underlying BaseFile/DataFile classes.
Maybe we can try to encapsulate this somehow in a StructLike class ?
--
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]