rdblue commented on code in PR #17159:
URL: https://github.com/apache/iceberg/pull/17159#discussion_r3562193487
##########
core/src/test/java/org/apache/iceberg/TestTrackedFileAdapters.java:
##########
@@ -76,6 +77,32 @@ class TestTrackedFileAdapters {
private static final int DELETION_VECTOR_ORDINAL =
ordinalOf(TRACKED_FILE_SCHEMA, "deletion_vector");
+ private static final Schema TABLE_SCHEMA =
+ new Schema(
+ optional(1, "id", Types.IntegerType.get()), optional(2, "score",
Types.FloatType.get()));
+ private static final Types.StructType CONTENT_STATS_TYPE =
+ StatsUtil.statsReadSchema(TABLE_SCHEMA, ImmutableList.of(1, 2));
+ private static final FieldStats<Integer> ID_STATS =
+ new FieldStatsStruct<>(
+ CONTENT_STATS_TYPE.fieldType("id").asStructType(), 1, 1000, true,
100L, 5L, 0L, null);
+ private static final FieldStats<Float> SCORE_STATS =
+ new FieldStatsStruct<>(
+ CONTENT_STATS_TYPE.fieldType("score").asStructType(),
+ 1.0f,
+ 100.0f,
+ true,
+ 100L,
+ 10L,
+ 3L,
+ null);
+ private static final ContentStatsStruct CONTENT_STATS =
Review Comment:
I left this in to continue testing the `MetricsUtil` conversion, but I
suspect that those conversions will be done lazily.
Those are the only place where `fieldId` is needed so I think we can avoid
needing to recover field ID from base ID if we rewrite them.
--
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]