felixYyu opened a new issue, #4762:
URL: https://github.com/apache/iceberg/issues/4762
I'm looking at the index code, The override method in IndexByName or
IndexParents all return the corresponding variables, but IndexById is not, I
think it should also needs to return the corresponding variable? cc: @rdblue
The last version:
```
@Override
public Map<Integer, Types.NestedField> field(
Types.NestedField field, Map<Integer, Types.NestedField> fieldResult) {
index.put(field.fieldId(), field);
return null;
}
@Override
public Map<Integer, Types.NestedField> list(Types.ListType list,
Map<Integer, Types.NestedField> elementResult) {
for (Types.NestedField field : list.fields()) {
index.put(field.fieldId(), field);
}
return null;
}
@Override
public Map<Integer, Types.NestedField> map(
Types.MapType map, Map<Integer, Types.NestedField> keyResult,
Map<Integer, Types.NestedField> valueResult) {
for (Types.NestedField field : map.fields()) {
index.put(field.fieldId(), field);
}
return null;
}
```
>
The return value may not always return null:
```
@Override
public Map<Integer, Types.NestedField> field(
Types.NestedField field, Map<Integer, Types.NestedField> fieldResult) {
index.put(field.fieldId(), field);
return index;
}
@Override
public Map<Integer, Types.NestedField> list(Types.ListType list,
Map<Integer, Types.NestedField> elementResult) {
for (Types.NestedField field : list.fields()) {
index.put(field.fieldId(), field);
}
return index;
}
@Override
public Map<Integer, Types.NestedField> map(
Types.MapType map, Map<Integer, Types.NestedField> keyResult,
Map<Integer, Types.NestedField> valueResult) {
for (Types.NestedField field : map.fields()) {
index.put(field.fieldId(), field);
}
return index;
}
```
--
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]