Skip to content

Commit ad76457

Browse files
committed
[MINOR] fix AvroSchemaConverter duplicate branch in 'switch'
1 parent 35afdb4 commit ad76457

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/util/AvroSchemaConverter.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ public static DataType convertToDataType(Schema schema) {
7171
}
7272
return DataTypes.ROW(fields).notNull();
7373
case ENUM:
74+
case STRING:
75+
// convert Avro's Utf8/CharSequence to String
7476
return DataTypes.STRING().notNull();
7577
case ARRAY:
7678
return DataTypes.ARRAY(convertToDataType(schema.getElementType())).notNull();
@@ -110,9 +112,6 @@ public static DataType convertToDataType(Schema schema) {
110112
}
111113
// convert fixed size binary data to primitive byte arrays
112114
return DataTypes.VARBINARY(schema.getFixedSize()).notNull();
113-
case STRING:
114-
// convert Avro's Utf8/CharSequence to String
115-
return DataTypes.STRING().notNull();
116115
case BYTES:
117116
// logical decimal type
118117
if (schema.getLogicalType() instanceof LogicalTypes.Decimal) {

0 commit comments

Comments
 (0)