mkhludnev commented on code in PR #27329:
URL: https://github.com/apache/beam/pull/27329#discussion_r1291130869
##########
sdks/java/extensions/avro/src/main/java/org/apache/beam/sdk/extensions/avro/schemas/utils/AvroUtils.java:
##########
@@ -441,16 +441,35 @@ public TypeConversion<StackManipulation>
createSetterConversions(StackManipulati
}
/** Get Beam Field from avro Field. */
- public static Field toBeamField(org.apache.avro.Schema.Field field) {
- TypeWithNullability nullableType = new TypeWithNullability(field.schema());
+ public static Schema.Field toBeamField(org.apache.avro.Schema.Field field) {
+ org.apache.avro.Schema avroSchema = field.schema();
+ TypeWithNullability nullableType = TypeWithNullability.create(avroSchema);
FieldType beamFieldType = toFieldType(nullableType);
- return Field.of(field.name(), beamFieldType);
+
+ if (beamFieldType.getTypeName() == TypeName.DECIMAL) {
Review Comment:
As far as I understood, here we extract aAvro type properties and brings
them into beam's type options.
--
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]