nastra commented on code in PR #17010:
URL: https://github.com/apache/iceberg/pull/17010#discussion_r3498858736
##########
api/src/test/java/org/apache/iceberg/types/TestTypeUtil.java:
##########
@@ -970,4 +970,69 @@ public void ancestorFieldsInNestedSchema() {
assertThat(TypeUtil.ancestorFields(schema,
16)).containsExactly(pointsElement, points);
assertThat(TypeUtil.ancestorFields(schema,
17)).containsExactly(pointsElement, points);
}
+
+ @Test
+ public void testIndexStatsNames() {
+ Schema schema =
+ new Schema(
+ required(1, "id", Types.LongType.get()),
+ optional(2, "data", Types.StringType.get()),
+ optional(
+ 3,
+ "location",
+ Types.StructType.of(
+ required(10, "lat", Types.FloatType.get()),
+ required(11, "long", Types.FloatType.get()))),
+ optional(4, "values", Types.ListType.ofOptional(12,
IntegerType.get())),
+ optional(
+ 5,
+ "points",
+ Types.ListType.ofRequired(
+ 13,
+ Types.StructType.of(
+ required(14, "x", IntegerType.get()),
+ required(15, "y", IntegerType.get())))),
+ optional(
+ 6,
+ "properties",
+ Types.MapType.ofOptional(16, 17, Types.StringType.get(),
Types.StringType.get())),
+ optional(
+ 7,
+ "addresses",
+ Types.MapType.ofRequired(
+ 18,
+ 19,
+ Types.StringType.get(),
+ Types.StructType.of(
+ required(20, "street", Types.StringType.get()),
+ optional(21, "city", Types.StringType.get()),
+ optional(22, "state", Types.StringType.get()),
+ required(23, "zip", Types.IntegerType.get())))));
Review Comment:
we might want to also add an entry with `24: value` so that we get `24:
addresses_value`, which doesn't conflict with `19: addresses_value`
--
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]