joyhaldar commented on code in PR #16638:
URL: https://github.com/apache/iceberg/pull/16638#discussion_r3366849398
##########
data/src/test/java/org/apache/iceberg/data/BaseFormatModelTests.java:
##########
@@ -2257,4 +2623,13 @@ private void readAndAssertEngineRecords(
assertEquals(
readSchema, convertToEngineRecords(expectedGenericRecords,
readSchema), readRecords);
}
+
+ private Schema primitiveDefaultsReadSchema() {
+ Schema schema = DataGenerators.PrimitiveDefaults.READ_SCHEMA;
+ if (supportsTime()) {
+ return schema;
+ }
+
+ return TypeUtil.selectNot(schema,
Set.of(schema.findField("time_with_default").fieldId()));
Review Comment:
I am now collecting the `fieldIds` by type instead of the name:
```java
Set<Integer> unsupportedFieldIds =
schema.columns().stream()
.filter(field -> field.type().typeId() == Type.TypeID.TIME)
.map(Types.NestedField::fieldId)
.collect(Collectors.toSet());
return TypeUtil.selectNot(schema, unsupportedFieldIds);
```
About dropping `supportsTime()` entirely via @rambleraptor's
`filterUnsupported`/`excludeColumnsContaining`, since #15795 adds those same
methods to `BaseFormatModelTests`, I didn't want to duplicate them here and
collide. Should we move to that once #15795 lands? Please let me know what you
think.
--
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]