1
0

[MINOR] fix AvroSchemaConverter duplicate branch in 'switch' (#5813)

This commit is contained in:
sandyfog
2022-06-13 10:55:24 +08:00
committed by GitHub
parent 5aaac21d1d
commit c82e3462e3

View File

@@ -71,6 +71,8 @@ public class AvroSchemaConverter {
}
return DataTypes.ROW(fields).notNull();
case ENUM:
case STRING:
// convert Avro's Utf8/CharSequence to String
return DataTypes.STRING().notNull();
case ARRAY:
return DataTypes.ARRAY(convertToDataType(schema.getElementType())).notNull();
@@ -110,9 +112,6 @@ public class AvroSchemaConverter {
}
// convert fixed size binary data to primitive byte arrays
return DataTypes.VARBINARY(schema.getFixedSize()).notNull();
case STRING:
// convert Avro's Utf8/CharSequence to String
return DataTypes.STRING().notNull();
case BYTES:
// logical decimal type
if (schema.getLogicalType() instanceof LogicalTypes.Decimal) {