RussellSpitzer commented on code in PR #11444: URL: https://github.com/apache/iceberg/pull/11444#discussion_r1828047216
########## api/src/test/java/org/apache/iceberg/TestSchema.java: ########## @@ -21,29 +21,30 @@ import static org.assertj.core.api.Assertions.assertThatCode; import static org.assertj.core.api.Assertions.assertThatThrownBy; +import java.util.List; +import java.util.Map; +import java.util.stream.IntStream; +import java.util.stream.Stream; +import org.apache.iceberg.relocated.com.google.common.collect.ImmutableList; +import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap; +import org.apache.iceberg.types.Type; import org.apache.iceberg.types.Types; -import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.FieldSource; +import org.junit.jupiter.params.provider.MethodSource; public class TestSchema { - private static final Schema TS_NANO_CASES = - new Schema( - Types.NestedField.required(1, "id", Types.LongType.get()), - Types.NestedField.optional(2, "ts", Types.TimestampNanoType.withZone()), - Types.NestedField.optional( - 3, "arr", Types.ListType.ofRequired(4, Types.TimestampNanoType.withoutZone())), - Types.NestedField.required( - 5, - "struct", - Types.StructType.of( - Types.NestedField.optional(6, "inner_ts", Types.TimestampNanoType.withZone()), - Types.NestedField.required(7, "data", Types.StringType.get()))), - Types.NestedField.optional( - 8, - "struct_arr", - Types.StructType.of( - Types.NestedField.optional(9, "ts", Types.TimestampNanoType.withoutZone())))); + + private static final List<Type> TESTTYPES = + ImmutableList.of(Types.TimestampNanoType.withoutZone(), Types.TimestampNanoType.withZone()); + + private static final Map<Type.TypeID, Integer> MIN_FORMAT_VERSIONS = + ImmutableMap.of(Type.TypeID.TIMESTAMP_NANO, 3); + + private static final Integer MIN_FORMAT_INITIAL_DEFAULT = 3; Review Comment: My only worry here is we won't catch bugs in bad constants in Schema.java, probably not a real worry -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org