pvary commented on code in PR #15675:
URL: https://github.com/apache/iceberg/pull/15675#discussion_r2980992863
##########
data/src/test/java/org/apache/iceberg/data/BaseFormatModelTests.java:
##########
@@ -73,6 +76,11 @@ public abstract class BaseFormatModelTests<T> {
protected abstract void assertEquals(Schema schema, List<T> expected,
List<T> actual);
+ protected abstract Object convertConstantToEngine(Types.NestedField field,
Object value);
Review Comment:
Could this help?
```
private static RowData convert(Types.StructType struct, StructLike record)
{
GenericRowData rowData = new GenericRowData(struct.fields().size());
List<Types.NestedField> fields = struct.fields();
for (int i = 0; i < fields.size(); i += 1) {
Types.NestedField field = fields.get(i);
Type fieldType = field.type();
rowData.setField(i, convert(fieldType, record.get(i, Object.class)));
}
return rowData;
}
```
Notice `StructLike record) {`, and `Object.class)));`
--
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]