xiarixiaoyao commented on a change in pull request #4421:
URL: https://github.com/apache/hudi/pull/4421#discussion_r773703134
##########
File path:
hudi-flink/src/main/java/org/apache/hudi/util/AvroSchemaConverter.java
##########
@@ -244,10 +244,13 @@ public static Schema convertToSchema(LogicalType
logicalType, String rowName) {
return nullable ? nullableSchema(time) : time;
case DECIMAL:
DecimalType decimalType = (DecimalType) logicalType;
- // store BigDecimal as byte[]
+ // store BigDecimal as Fixed
+ // for spark compatibility.
Schema decimal =
LogicalTypes.decimal(decimalType.getPrecision(),
decimalType.getScale())
- .addToSchema(SchemaBuilder.builder().bytesType());
+ .addToSchema(SchemaBuilder
+ .fixed(String.format("%s.fixed", rowName))
+
.size(computeMinBytesForDecimlPrecision(decimalType.getPrecision())));
Review comment:
Thank you for your reminder. let me find a hive2 environment to verify
this pr.
by the way, how about control this behavior by configurations item
--
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]