rdblue commented on code in PR #16958:
URL: https://github.com/apache/iceberg/pull/16958#discussion_r3633485515
##########
core/src/main/java/org/apache/iceberg/TrackedFile.java:
##########
@@ -95,20 +96,39 @@ interface TrackedFile {
Types.ListType.ofRequired(136, Types.IntegerType.get()),
"Field ids used to determine row equality in equality delete files");
- static Types.StructType schemaWithContentStats(
+ /**
+ * Returns the schema for the given partition and content stats types.
+ *
+ * <p>The partition and content stats fields use {@link Types.UnknownType}
when their types have
+ * no fields, so that they are not stored in manifest files.
+ */
+ static Types.StructType schema(
Types.StructType partitionType, Types.StructType contentStatsType) {
+ return schema(Tracking.schema(), partitionType, contentStatsType);
+ }
+
+ /** Returns the schema with the given tracking, partition, and content stats
types. */
+ static Types.StructType schema(
Review Comment:
I'd prefer to remove this method since it is public.
Right now, this method is used to project fields within the `Tracking`
struct, but the intent of the `schema` method is to build the full schema,
based on parts that are table-dependent (the union partition type and the
content stats type). I think projection should use the normal path, where we
prune the full schema to select the fields that we want.
--
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]