You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by "William Lo (Jira)" <ji...@apache.org> on 2023/04/28 03:11:00 UTC
[jira] [Created] (GOBBLIN-1827) Avro Flattener should order nested optional fields correctly if they have a non-null default value
William Lo created GOBBLIN-1827:
-----------------------------------
Summary: Avro Flattener should order nested optional fields correctly if they have a non-null default value
Key: GOBBLIN-1827
URL: https://issues.apache.org/jira/browse/GOBBLIN-1827
Project: Apache Gobblin
Issue Type: Bug
Components: gobblin-core
Reporter: William Lo
Assignee: Abhishek Tiwari
* Consider the following description:
* Record R1 \{
* fields : {[
* {
* Union : [
* null,
* Record R2 {
* fields : {[
* {
* String S1
*. default: String S3
* }, \{
* String S2
* }
* ]}
* }
* }
* ]}
* }
* will be flattened to:
* Record R1 \{
* fields : {[
* {
* Union : [ null, String S1]
*. default: String S3
* }, \{
* Union : [ null, String S2]
* }
* ]}
* }
Due to the addition of the AvroCompatibilityHelper, Avro flattening can run into an issue in the above scenario due to the nested non-null default S3 since the default type needs to be the first type in the field order. So R1 should have field S1 as Union [String S1, null]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)