Skip to content

Commit

Permalink
Rename to avoid name conflict.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdblue committed Dec 22, 2023
1 parent 0d0780c commit 9962d62
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ public ValueReader<?> record(Type partner, Schema record, List<ValueReader<?>> f
List<Schema.Field> fileFields = record.getFields();
for (int pos = 0; pos < fileFields.size(); pos += 1) {
Schema.Field field = fileFields.get(pos);
ValueReader<?> reader = fieldResults.get(pos);
ValueReader<?> fieldReader = fieldResults.get(pos);
Integer fieldId = AvroSchemaUtil.fieldId(field);
Integer projectionPos = idToPos.remove(fieldId);

Object constant = idToConstant.get(fieldId);
if (projectionPos != null && constant != null) {
readPlan.add(Pair.of(projectionPos, ValueReaders.replaceWithConstant(reader, constant)));
readPlan.add(Pair.of(projectionPos, ValueReaders.replaceWithConstant(fieldReader, constant)));
} else {
readPlan.add(Pair.of(projectionPos, reader));
readPlan.add(Pair.of(projectionPos, fieldReader));
}
}

Expand Down

0 comments on commit 9962d62

Please sign in to comment.