You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Roland Johann (Jira)" <ji...@apache.org> on 2020/05/06 12:43:00 UTC
[jira] [Updated] (HUDI-863) nested structs containing decimal types
lead to null pointer exception
[ https://issues.apache.org/jira/browse/HUDI-863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Roland Johann updated HUDI-863:
-------------------------------
Status: Open (was: New)
> nested structs containing decimal types lead to null pointer exception
> ----------------------------------------------------------------------
>
> Key: HUDI-863
> URL: https://issues.apache.org/jira/browse/HUDI-863
> Project: Apache Hudi (incubating)
> Issue Type: Bug
> Reporter: Roland Johann
> Priority: Major
>
> Currently the avro schema gets passed to AvroConversionHelper.createConverterToAvro which itself pocesses passed spark sql DataTypes recursively to resolve structs, arrays, etc. - the AvroSchema gets passed to recursions, but without selection of the relevant field and therefore schema of that field. That leads to a null pointer exception when decimal types will be processed, because in that case the schema of the filed will be retrieved by calling getField on the root schema which is not defined when we deal with nested records.
> [AvroConversionHelper.scala#L291|https://github.com/apache/incubator-hudi/blob/master/hudi-spark/src/main/scala/org/apache/hudi/AvroConversionHelper.scala#L291]
> The proposed solution is to remove the dependency on the avro schema and derive the particular avro schema for the decimal converter creator case only.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)