hudi
hudi copied to clipboard
[HUDI-4894] Fix ClassCastException when using fixed type defining dec…
when use fixed type to define decimal column, hudi will throw a ClassCastException
Caused by: java.lang.ClassCastException: java.lang.Double cannot be cast to java.util.List
at org.apache.hudi.avro.MercifulJsonConverter$9.convert(MercifulJsonConverter.java:254)
at org.apache.hudi.avro.MercifulJsonConverter$JsonToAvroFieldProcessor.convertToAvro(MercifulJsonConverter.java:151)
at org.apache.hudi.avro.MercifulJsonConverter.convertJsonToAvroField(MercifulJsonConverter.java:140)
at org.apache.hudi.avro.MercifulJsonConverter.convertJsonToAvro(MercifulJsonConverter.java:107)
at org.apache.hudi.avro.MercifulJsonConverter.convert(MercifulJsonConverter.java:96)
at org.apache.hudi.utilities.sources.helpers.AvroConvertor.fromJs
schema for decimal column
{
"name": "column_name",
"type": ["null", {
"type": "fixed",
"name": "fixed",
"size": 5,
"logicalType": "decimal",
"precision": 10,
"scale": 2
}],
"default": null
}
Change Logs
Describe context and summary for this change. Highlight if any code was copied.
Impact
Describe any public API or user-facing feature change or any performance impact.
Risk level: none | low | medium | high
Choose one. If medium or high, explain what verification was done to mitigate the risks.
Contributor's checklist
- [ ] Read through contributor's guide
- [ ] Change Logs and Impact were stated clearly
- [ ] Adequate tests were added if applicable
- [ ] CI passed
@hudi-bot run azure
cancelling all azure CI runs for now to investigate CI flakiness. will retrigger build once we are in stable state. sorry about the inconvenience.
@shenh062326 can you also take a look at this ?
CI report:
- a41207c6914f7e5778658abc361f4c8cb50be13a Azure: FAILURE
Bot commands
@hudi-bot supports the following commands:@hudi-bot run azurere-run the last Azure build
@xushiyan : PR is assigned to you. Will you be following up?