[jira] [Commented] (AVRO-2836) SpecificCompiler does not add DecimalConversion when logical type is a Fixed type
[ https://issues.apache.org/jira/browse/AVRO-2836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17116794#comment-17116794 ] Hudson commented on AVRO-2836: -- FAILURE: Integrated in Jenkins build AvroJava #890 (See [https://builds.apache.org/job/AvroJava/890/]) AVRO-2836 Generated java includes logical type conversions (#883) (github: [https://github.com/apache/avro/commit/ab83dcd6fee848cb0a82a9da328e114cc9e3568b]) * (add) lang/java/integration-test/codegen-test/src/test/resources/avro/nested_logical_types_union_fixed.avsc * (edit) lang/java/integration-test/test-custom-conversions/src/main/java/org/apache/avro/codegentest/CustomDecimal.java * (edit) lang/java/integration-test/codegen-test/src/test/java/org/apache/avro/codegentest/TestNestedLogicalTypes.java * (edit) lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java * (edit) lang/java/integration-test/test-custom-conversions/src/main/java/org/apache/avro/codegentest/CustomDecimalConversion.java > SpecificCompiler does not add DecimalConversion when logical type is a Fixed > type > - > > Key: AVRO-2836 > URL: https://issues.apache.org/jira/browse/AVRO-2836 > Project: Apache Avro > Issue Type: Bug > Components: java, logical types >Affects Versions: 1.9.2 >Reporter: Matthew McMahon >Assignee: Matthew McMahon >Priority: Major > Fix For: 1.10.0 > > Attachments: AVRO-2836.patch > > > I have updated to Avro 1.9.2 using the avro-maven-plugin to generate the > specific types. > This is working nicely, except noticed the case of: > {code:java} > "fields": [ > { > "name": "unionOfFixedDecimal", > "type": ["null", { > "namespace": "org.apache.avro.codegentest.testdata", > "name": "FixedInUnion", > "type": "fixed", > "size": 12, > "logicalType": "decimal", > "precision": 28, > "scale": 15 > }] > }] {code} > This is a fixed type that has a logical type of decimal. > When the source is generated, the type is BigDecimal. However the > DecimalConversion is missing and then it breaks when used. > It seems easy to workaround by manually adding the logical conversion before > using. > However the fix seems to be in > SpecificCompiler#getClassNamesOfPrimitiveFields which is used by > #getUsedConversionClasses -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (AVRO-2836) SpecificCompiler does not add DecimalConversion when logical type is a Fixed type
[ https://issues.apache.org/jira/browse/AVRO-2836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17116764#comment-17116764 ] ASF subversion and git services commented on AVRO-2836: --- Commit ab83dcd6fee848cb0a82a9da328e114cc9e3568b in avro's branch refs/heads/master from Matthew McMahon [ https://gitbox.apache.org/repos/asf?p=avro.git;h=ab83dcd ] AVRO-2836 Generated java includes logical type conversions (#883) * AVRO-2836 Generated java includes logical type conversions If the logical type is used for a Fixed type (potentially also Enum) then it should check if there are any conversions used, and include in the generated java source * AVRO-2836 Generated java includes logical type conversions Move enum and fixed to use the javatype method, as if there is a logical type conversion it will be picked up and remove a code path > SpecificCompiler does not add DecimalConversion when logical type is a Fixed > type > - > > Key: AVRO-2836 > URL: https://issues.apache.org/jira/browse/AVRO-2836 > Project: Apache Avro > Issue Type: Bug > Components: java, logical types >Affects Versions: 1.9.2 >Reporter: Matthew McMahon >Assignee: Matthew McMahon >Priority: Major > Attachments: AVRO-2836.patch > > > I have updated to Avro 1.9.2 using the avro-maven-plugin to generate the > specific types. > This is working nicely, except noticed the case of: > {code:java} > "fields": [ > { > "name": "unionOfFixedDecimal", > "type": ["null", { > "namespace": "org.apache.avro.codegentest.testdata", > "name": "FixedInUnion", > "type": "fixed", > "size": 12, > "logicalType": "decimal", > "precision": 28, > "scale": 15 > }] > }] {code} > This is a fixed type that has a logical type of decimal. > When the source is generated, the type is BigDecimal. However the > DecimalConversion is missing and then it breaks when used. > It seems easy to workaround by manually adding the logical conversion before > using. > However the fix seems to be in > SpecificCompiler#getClassNamesOfPrimitiveFields which is used by > #getUsedConversionClasses -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (AVRO-2836) SpecificCompiler does not add DecimalConversion when logical type is a Fixed type
[ https://issues.apache.org/jira/browse/AVRO-2836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17116763#comment-17116763 ] ASF subversion and git services commented on AVRO-2836: --- Commit ab83dcd6fee848cb0a82a9da328e114cc9e3568b in avro's branch refs/heads/master from Matthew McMahon [ https://gitbox.apache.org/repos/asf?p=avro.git;h=ab83dcd ] AVRO-2836 Generated java includes logical type conversions (#883) * AVRO-2836 Generated java includes logical type conversions If the logical type is used for a Fixed type (potentially also Enum) then it should check if there are any conversions used, and include in the generated java source * AVRO-2836 Generated java includes logical type conversions Move enum and fixed to use the javatype method, as if there is a logical type conversion it will be picked up and remove a code path > SpecificCompiler does not add DecimalConversion when logical type is a Fixed > type > - > > Key: AVRO-2836 > URL: https://issues.apache.org/jira/browse/AVRO-2836 > Project: Apache Avro > Issue Type: Bug > Components: java, logical types >Affects Versions: 1.9.2 >Reporter: Matthew McMahon >Assignee: Matthew McMahon >Priority: Major > Attachments: AVRO-2836.patch > > > I have updated to Avro 1.9.2 using the avro-maven-plugin to generate the > specific types. > This is working nicely, except noticed the case of: > {code:java} > "fields": [ > { > "name": "unionOfFixedDecimal", > "type": ["null", { > "namespace": "org.apache.avro.codegentest.testdata", > "name": "FixedInUnion", > "type": "fixed", > "size": 12, > "logicalType": "decimal", > "precision": 28, > "scale": 15 > }] > }] {code} > This is a fixed type that has a logical type of decimal. > When the source is generated, the type is BigDecimal. However the > DecimalConversion is missing and then it breaks when used. > It seems easy to workaround by manually adding the logical conversion before > using. > However the fix seems to be in > SpecificCompiler#getClassNamesOfPrimitiveFields which is used by > #getUsedConversionClasses -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (AVRO-2836) SpecificCompiler does not add DecimalConversion when logical type is a Fixed type
[ https://issues.apache.org/jira/browse/AVRO-2836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17116762#comment-17116762 ] ASF subversion and git services commented on AVRO-2836: --- Commit ab83dcd6fee848cb0a82a9da328e114cc9e3568b in avro's branch refs/heads/master from Matthew McMahon [ https://gitbox.apache.org/repos/asf?p=avro.git;h=ab83dcd ] AVRO-2836 Generated java includes logical type conversions (#883) * AVRO-2836 Generated java includes logical type conversions If the logical type is used for a Fixed type (potentially also Enum) then it should check if there are any conversions used, and include in the generated java source * AVRO-2836 Generated java includes logical type conversions Move enum and fixed to use the javatype method, as if there is a logical type conversion it will be picked up and remove a code path > SpecificCompiler does not add DecimalConversion when logical type is a Fixed > type > - > > Key: AVRO-2836 > URL: https://issues.apache.org/jira/browse/AVRO-2836 > Project: Apache Avro > Issue Type: Bug > Components: java, logical types >Affects Versions: 1.9.2 >Reporter: Matthew McMahon >Assignee: Matthew McMahon >Priority: Major > Attachments: AVRO-2836.patch > > > I have updated to Avro 1.9.2 using the avro-maven-plugin to generate the > specific types. > This is working nicely, except noticed the case of: > {code:java} > "fields": [ > { > "name": "unionOfFixedDecimal", > "type": ["null", { > "namespace": "org.apache.avro.codegentest.testdata", > "name": "FixedInUnion", > "type": "fixed", > "size": 12, > "logicalType": "decimal", > "precision": 28, > "scale": 15 > }] > }] {code} > This is a fixed type that has a logical type of decimal. > When the source is generated, the type is BigDecimal. However the > DecimalConversion is missing and then it breaks when used. > It seems easy to workaround by manually adding the logical conversion before > using. > However the fix seems to be in > SpecificCompiler#getClassNamesOfPrimitiveFields which is used by > #getUsedConversionClasses -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (AVRO-2836) SpecificCompiler does not add DecimalConversion when logical type is a Fixed type
[ https://issues.apache.org/jira/browse/AVRO-2836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17108231#comment-17108231 ] Matthew McMahon commented on AVRO-2836: --- [^AVRO-2836.patch] Also created PR in Gitlab at [https://github.com/apache/avro/pull/883] Appreciate any feedback > SpecificCompiler does not add DecimalConversion when logical type is a Fixed > type > - > > Key: AVRO-2836 > URL: https://issues.apache.org/jira/browse/AVRO-2836 > Project: Apache Avro > Issue Type: Bug > Components: java, logical types >Affects Versions: 1.9.2 >Reporter: Matthew McMahon >Priority: Major > Attachments: AVRO-2836.patch > > > I have updated to Avro 1.9.2 using the avro-maven-plugin to generate the > specific types. > This is working nicely, except noticed the case of: > {code:java} > "fields": [ > { > "name": "unionOfFixedDecimal", > "type": ["null", { > "namespace": "org.apache.avro.codegentest.testdata", > "name": "FixedInUnion", > "type": "fixed", > "size": 12, > "logicalType": "decimal", > "precision": 28, > "scale": 15 > }] > }] {code} > This is a fixed type that has a logical type of decimal. > When the source is generated, the type is BigDecimal. However the > DecimalConversion is missing and then it breaks when used. > It seems easy to workaround by manually adding the logical conversion before > using. > However the fix seems to be in > SpecificCompiler#getClassNamesOfPrimitiveFields which is used by > #getUsedConversionClasses -- This message was sent by Atlassian Jira (v8.3.4#803005)