[jira] [Commented] (AVRO-2903) Validation error with a default double value
[ https://issues.apache.org/jira/browse/AVRO-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17428127#comment-17428127 ] Ryan Skraba commented on AVRO-2903: --- Ooop – a mistake! I've cherry-picked this into [branch-1.11|https://github.com/apache/avro/commit/85a49f28dcc292d88c35205a31774c80e8f99875] which was my original intention. I'll leave it on branch-1.10 just in case there is ever a 1.10.x release! > Validation error with a default double value > > > Key: AVRO-2903 > URL: https://issues.apache.org/jira/browse/AVRO-2903 > Project: Apache Avro > Issue Type: Bug > Components: ruby >Affects Versions: 1.9.2 >Reporter: JAEJOON LEE >Assignee: Tim Perkins >Priority: Major > Labels: pull-request-available > Fix For: 1.11.0 > > Attachments: AVRO-2903.patch > > Time Spent: 40m > Remaining Estimate: 0h > > Hi > When I use _logstash-codec-avro_schema_registry_, > the following schema always raises an error for validating default. > {code:java} > // json > { > "type": "record", > "name": "RawLog", > ... > "fields": [ > { > "name": "exchangeRate", > "type": "double", > "default": 1.0 > }, > ...{code} > > This is an error message. > {code:java} > Error: Error validating default for exchangeRate: at . expected type double, > got BigDecimal with value 0.1e1 > Exception: Avro::SchemaParseError > Stack: > /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/avro-1.9.2/lib/avro/schema.rb:403:in > `validate_default!' > {code} > > It seems like the default value treated as BigDecimal, but it should be > double. > The plugin code - _logstash-codec-avro_schema_registry_ - , > they just simply use avro lib & schema registry, > hard to find any proper reason why that make a validation error. > > If I put the BigDecimal as default value at validate_simple(), > is it make a sense ? > Please help me and reviews this patch. > > Thanks. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (AVRO-2903) Validation error with a default double value
[ https://issues.apache.org/jira/browse/AVRO-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17428126#comment-17428126 ] ASF subversion and git services commented on AVRO-2903: --- Commit 85a49f28dcc292d88c35205a31774c80e8f99875 in avro's branch refs/heads/branch-1.11 from Tim Perkins [ https://gitbox.apache.org/repos/asf?p=avro.git;h=85a49f2 ] AVRO-2903: Ruby: accept BigDecimal datum for float and double (#1364) Co-authored-by: jjlee > Validation error with a default double value > > > Key: AVRO-2903 > URL: https://issues.apache.org/jira/browse/AVRO-2903 > Project: Apache Avro > Issue Type: Bug > Components: ruby >Affects Versions: 1.9.2 >Reporter: JAEJOON LEE >Assignee: Tim Perkins >Priority: Major > Labels: pull-request-available > Fix For: 1.11.0 > > Attachments: AVRO-2903.patch > > Time Spent: 40m > Remaining Estimate: 0h > > Hi > When I use _logstash-codec-avro_schema_registry_, > the following schema always raises an error for validating default. > {code:java} > // json > { > "type": "record", > "name": "RawLog", > ... > "fields": [ > { > "name": "exchangeRate", > "type": "double", > "default": 1.0 > }, > ...{code} > > This is an error message. > {code:java} > Error: Error validating default for exchangeRate: at . expected type double, > got BigDecimal with value 0.1e1 > Exception: Avro::SchemaParseError > Stack: > /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/avro-1.9.2/lib/avro/schema.rb:403:in > `validate_default!' > {code} > > It seems like the default value treated as BigDecimal, but it should be > double. > The plugin code - _logstash-codec-avro_schema_registry_ - , > they just simply use avro lib & schema registry, > hard to find any proper reason why that make a validation error. > > If I put the BigDecimal as default value at validate_simple(), > is it make a sense ? > Please help me and reviews this patch. > > Thanks. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (AVRO-2903) Validation error with a default double value
[ https://issues.apache.org/jira/browse/AVRO-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17427858#comment-17427858 ] Tim Perkins commented on AVRO-2903: --- [~rskraba] - great, thanks for picking it up! > Validation error with a default double value > > > Key: AVRO-2903 > URL: https://issues.apache.org/jira/browse/AVRO-2903 > Project: Apache Avro > Issue Type: Bug > Components: ruby >Affects Versions: 1.9.2 >Reporter: JAEJOON LEE >Assignee: Tim Perkins >Priority: Major > Labels: pull-request-available > Fix For: 1.11.0 > > Attachments: AVRO-2903.patch > > Time Spent: 40m > Remaining Estimate: 0h > > Hi > When I use _logstash-codec-avro_schema_registry_, > the following schema always raises an error for validating default. > {code:java} > // json > { > "type": "record", > "name": "RawLog", > ... > "fields": [ > { > "name": "exchangeRate", > "type": "double", > "default": 1.0 > }, > ...{code} > > This is an error message. > {code:java} > Error: Error validating default for exchangeRate: at . expected type double, > got BigDecimal with value 0.1e1 > Exception: Avro::SchemaParseError > Stack: > /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/avro-1.9.2/lib/avro/schema.rb:403:in > `validate_default!' > {code} > > It seems like the default value treated as BigDecimal, but it should be > double. > The plugin code - _logstash-codec-avro_schema_registry_ - , > they just simply use avro lib & schema registry, > hard to find any proper reason why that make a validation error. > > If I put the BigDecimal as default value at validate_simple(), > is it make a sense ? > Please help me and reviews this patch. > > Thanks. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (AVRO-2903) Validation error with a default double value
[ https://issues.apache.org/jira/browse/AVRO-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17427768#comment-17427768 ] Ryan Skraba commented on AVRO-2903: --- Thanks for the contribution! I've cherry-picked this into [branch-1.10|https://github.com/apache/avro/commit/a6f13b269a359d3839e55a75e0662d834d76992c] so you should see it in the next 1.11.0 release candidate. Does that sound OK? > Validation error with a default double value > > > Key: AVRO-2903 > URL: https://issues.apache.org/jira/browse/AVRO-2903 > Project: Apache Avro > Issue Type: Bug > Components: ruby >Affects Versions: 1.9.2 >Reporter: JAEJOON LEE >Assignee: Tim Perkins >Priority: Major > Labels: pull-request-available > Fix For: 1.11.0 > > Attachments: AVRO-2903.patch > > Time Spent: 40m > Remaining Estimate: 0h > > Hi > When I use _logstash-codec-avro_schema_registry_, > the following schema always raises an error for validating default. > {code:java} > // json > { > "type": "record", > "name": "RawLog", > ... > "fields": [ > { > "name": "exchangeRate", > "type": "double", > "default": 1.0 > }, > ...{code} > > This is an error message. > {code:java} > Error: Error validating default for exchangeRate: at . expected type double, > got BigDecimal with value 0.1e1 > Exception: Avro::SchemaParseError > Stack: > /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/avro-1.9.2/lib/avro/schema.rb:403:in > `validate_default!' > {code} > > It seems like the default value treated as BigDecimal, but it should be > double. > The plugin code - _logstash-codec-avro_schema_registry_ - , > they just simply use avro lib & schema registry, > hard to find any proper reason why that make a validation error. > > If I put the BigDecimal as default value at validate_simple(), > is it make a sense ? > Please help me and reviews this patch. > > Thanks. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (AVRO-2903) Validation error with a default double value
[ https://issues.apache.org/jira/browse/AVRO-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17427763#comment-17427763 ] ASF subversion and git services commented on AVRO-2903: --- Commit a6f13b269a359d3839e55a75e0662d834d76992c in avro's branch refs/heads/branch-1.10 from Tim Perkins [ https://gitbox.apache.org/repos/asf?p=avro.git;h=a6f13b2 ] AVRO-2903: Ruby: accept BigDecimal datum for float and double (#1364) Co-authored-by: jjlee > Validation error with a default double value > > > Key: AVRO-2903 > URL: https://issues.apache.org/jira/browse/AVRO-2903 > Project: Apache Avro > Issue Type: Bug > Components: ruby >Affects Versions: 1.9.2 >Reporter: JAEJOON LEE >Assignee: Tim Perkins >Priority: Major > Labels: pull-request-available > Fix For: 1.11.0 > > Attachments: AVRO-2903.patch > > Time Spent: 40m > Remaining Estimate: 0h > > Hi > When I use _logstash-codec-avro_schema_registry_, > the following schema always raises an error for validating default. > {code:java} > // json > { > "type": "record", > "name": "RawLog", > ... > "fields": [ > { > "name": "exchangeRate", > "type": "double", > "default": 1.0 > }, > ...{code} > > This is an error message. > {code:java} > Error: Error validating default for exchangeRate: at . expected type double, > got BigDecimal with value 0.1e1 > Exception: Avro::SchemaParseError > Stack: > /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/avro-1.9.2/lib/avro/schema.rb:403:in > `validate_default!' > {code} > > It seems like the default value treated as BigDecimal, but it should be > double. > The plugin code - _logstash-codec-avro_schema_registry_ - , > they just simply use avro lib & schema registry, > hard to find any proper reason why that make a validation error. > > If I put the BigDecimal as default value at validate_simple(), > is it make a sense ? > Please help me and reviews this patch. > > Thanks. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (AVRO-2903) Validation error with a default double value
[ https://issues.apache.org/jira/browse/AVRO-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17427728#comment-17427728 ] ASF subversion and git services commented on AVRO-2903: --- Commit dee5e32f8581107c28f73dc95fff74c0b4efc6f1 in avro's branch refs/heads/dependabot/npm_and_yarn/lang/js/jshint-2.13.1 from Tim Perkins [ https://gitbox.apache.org/repos/asf?p=avro.git;h=dee5e32 ] AVRO-2903: Ruby: accept BigDecimal datum for float and double (#1364) Co-authored-by: jjlee > Validation error with a default double value > > > Key: AVRO-2903 > URL: https://issues.apache.org/jira/browse/AVRO-2903 > Project: Apache Avro > Issue Type: Bug > Components: ruby >Affects Versions: 1.9.2 >Reporter: JAEJOON LEE >Assignee: Tim Perkins >Priority: Major > Labels: pull-request-available > Fix For: 1.11.1 > > Attachments: AVRO-2903.patch > > Time Spent: 40m > Remaining Estimate: 0h > > Hi > When I use _logstash-codec-avro_schema_registry_, > the following schema always raises an error for validating default. > {code:java} > // json > { > "type": "record", > "name": "RawLog", > ... > "fields": [ > { > "name": "exchangeRate", > "type": "double", > "default": 1.0 > }, > ...{code} > > This is an error message. > {code:java} > Error: Error validating default for exchangeRate: at . expected type double, > got BigDecimal with value 0.1e1 > Exception: Avro::SchemaParseError > Stack: > /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/avro-1.9.2/lib/avro/schema.rb:403:in > `validate_default!' > {code} > > It seems like the default value treated as BigDecimal, but it should be > double. > The plugin code - _logstash-codec-avro_schema_registry_ - , > they just simply use avro lib & schema registry, > hard to find any proper reason why that make a validation error. > > If I put the BigDecimal as default value at validate_simple(), > is it make a sense ? > Please help me and reviews this patch. > > Thanks. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (AVRO-2903) Validation error with a default double value
[ https://issues.apache.org/jira/browse/AVRO-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17427736#comment-17427736 ] ASF subversion and git services commented on AVRO-2903: --- Commit dee5e32f8581107c28f73dc95fff74c0b4efc6f1 in avro's branch refs/heads/dependabot/npm_and_yarn/lang/js/mocha-9.1.2 from Tim Perkins [ https://gitbox.apache.org/repos/asf?p=avro.git;h=dee5e32 ] AVRO-2903: Ruby: accept BigDecimal datum for float and double (#1364) Co-authored-by: jjlee > Validation error with a default double value > > > Key: AVRO-2903 > URL: https://issues.apache.org/jira/browse/AVRO-2903 > Project: Apache Avro > Issue Type: Bug > Components: ruby >Affects Versions: 1.9.2 >Reporter: JAEJOON LEE >Assignee: Tim Perkins >Priority: Major > Labels: pull-request-available > Fix For: 1.11.1 > > Attachments: AVRO-2903.patch > > Time Spent: 40m > Remaining Estimate: 0h > > Hi > When I use _logstash-codec-avro_schema_registry_, > the following schema always raises an error for validating default. > {code:java} > // json > { > "type": "record", > "name": "RawLog", > ... > "fields": [ > { > "name": "exchangeRate", > "type": "double", > "default": 1.0 > }, > ...{code} > > This is an error message. > {code:java} > Error: Error validating default for exchangeRate: at . expected type double, > got BigDecimal with value 0.1e1 > Exception: Avro::SchemaParseError > Stack: > /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/avro-1.9.2/lib/avro/schema.rb:403:in > `validate_default!' > {code} > > It seems like the default value treated as BigDecimal, but it should be > double. > The plugin code - _logstash-codec-avro_schema_registry_ - , > they just simply use avro lib & schema registry, > hard to find any proper reason why that make a validation error. > > If I put the BigDecimal as default value at validate_simple(), > is it make a sense ? > Please help me and reviews this patch. > > Thanks. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (AVRO-2903) Validation error with a default double value
[ https://issues.apache.org/jira/browse/AVRO-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17427719#comment-17427719 ] ASF subversion and git services commented on AVRO-2903: --- Commit dee5e32f8581107c28f73dc95fff74c0b4efc6f1 in avro's branch refs/heads/dependabot/npm_and_yarn/lang/js/tmp-0.2.1 from Tim Perkins [ https://gitbox.apache.org/repos/asf?p=avro.git;h=dee5e32 ] AVRO-2903: Ruby: accept BigDecimal datum for float and double (#1364) Co-authored-by: jjlee > Validation error with a default double value > > > Key: AVRO-2903 > URL: https://issues.apache.org/jira/browse/AVRO-2903 > Project: Apache Avro > Issue Type: Bug > Components: ruby >Affects Versions: 1.9.2 >Reporter: JAEJOON LEE >Assignee: Tim Perkins >Priority: Major > Labels: pull-request-available > Fix For: 1.11.1 > > Attachments: AVRO-2903.patch > > Time Spent: 40m > Remaining Estimate: 0h > > Hi > When I use _logstash-codec-avro_schema_registry_, > the following schema always raises an error for validating default. > {code:java} > // json > { > "type": "record", > "name": "RawLog", > ... > "fields": [ > { > "name": "exchangeRate", > "type": "double", > "default": 1.0 > }, > ...{code} > > This is an error message. > {code:java} > Error: Error validating default for exchangeRate: at . expected type double, > got BigDecimal with value 0.1e1 > Exception: Avro::SchemaParseError > Stack: > /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/avro-1.9.2/lib/avro/schema.rb:403:in > `validate_default!' > {code} > > It seems like the default value treated as BigDecimal, but it should be > double. > The plugin code - _logstash-codec-avro_schema_registry_ - , > they just simply use avro lib & schema registry, > hard to find any proper reason why that make a validation error. > > If I put the BigDecimal as default value at validate_simple(), > is it make a sense ? > Please help me and reviews this patch. > > Thanks. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (AVRO-2903) Validation error with a default double value
[ https://issues.apache.org/jira/browse/AVRO-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17427654#comment-17427654 ] ASF subversion and git services commented on AVRO-2903: --- Commit dee5e32f8581107c28f73dc95fff74c0b4efc6f1 in avro's branch refs/heads/master from Tim Perkins [ https://gitbox.apache.org/repos/asf?p=avro.git;h=dee5e32 ] AVRO-2903: Ruby: accept BigDecimal datum for float and double (#1364) Co-authored-by: jjlee > Validation error with a default double value > > > Key: AVRO-2903 > URL: https://issues.apache.org/jira/browse/AVRO-2903 > Project: Apache Avro > Issue Type: Bug > Components: ruby >Affects Versions: 1.9.2 >Reporter: JAEJOON LEE >Assignee: Tim Perkins >Priority: Major > Labels: pull-request-available > Attachments: AVRO-2903.patch > > Time Spent: 0.5h > Remaining Estimate: 0h > > Hi > When I use _logstash-codec-avro_schema_registry_, > the following schema always raises an error for validating default. > {code:java} > // json > { > "type": "record", > "name": "RawLog", > ... > "fields": [ > { > "name": "exchangeRate", > "type": "double", > "default": 1.0 > }, > ...{code} > > This is an error message. > {code:java} > Error: Error validating default for exchangeRate: at . expected type double, > got BigDecimal with value 0.1e1 > Exception: Avro::SchemaParseError > Stack: > /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/avro-1.9.2/lib/avro/schema.rb:403:in > `validate_default!' > {code} > > It seems like the default value treated as BigDecimal, but it should be > double. > The plugin code - _logstash-codec-avro_schema_registry_ - , > they just simply use avro lib & schema registry, > hard to find any proper reason why that make a validation error. > > If I put the BigDecimal as default value at validate_simple(), > is it make a sense ? > Please help me and reviews this patch. > > Thanks. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (AVRO-2903) Validation error with a default double value
[ https://issues.apache.org/jira/browse/AVRO-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17427398#comment-17427398 ] Tim Perkins commented on AVRO-2903: --- PR opened with the previous fix and a test: https://github.com/apache/avro/pull/1364 > Validation error with a default double value > > > Key: AVRO-2903 > URL: https://issues.apache.org/jira/browse/AVRO-2903 > Project: Apache Avro > Issue Type: Bug > Components: ruby >Affects Versions: 1.9.2 >Reporter: JAEJOON LEE >Assignee: Tim Perkins >Priority: Major > Labels: pull-request-available > Attachments: AVRO-2903.patch > > Time Spent: 0.5h > Remaining Estimate: 0h > > Hi > When I use _logstash-codec-avro_schema_registry_, > the following schema always raises an error for validating default. > {code:java} > // json > { > "type": "record", > "name": "RawLog", > ... > "fields": [ > { > "name": "exchangeRate", > "type": "double", > "default": 1.0 > }, > ...{code} > > This is an error message. > {code:java} > Error: Error validating default for exchangeRate: at . expected type double, > got BigDecimal with value 0.1e1 > Exception: Avro::SchemaParseError > Stack: > /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/avro-1.9.2/lib/avro/schema.rb:403:in > `validate_default!' > {code} > > It seems like the default value treated as BigDecimal, but it should be > double. > The plugin code - _logstash-codec-avro_schema_registry_ - , > they just simply use avro lib & schema registry, > hard to find any proper reason why that make a validation error. > > If I put the BigDecimal as default value at validate_simple(), > is it make a sense ? > Please help me and reviews this patch. > > Thanks. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (AVRO-2903) Validation error with a default double value
[ https://issues.apache.org/jira/browse/AVRO-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17163168#comment-17163168 ] JAEJOON LEE commented on AVRO-2903: --- [~fokko] Here is github PR: [https://github.com/apache/avro/pull/935] Thanks for your reply. > Validation error with a default double value > > > Key: AVRO-2903 > URL: https://issues.apache.org/jira/browse/AVRO-2903 > Project: Apache Avro > Issue Type: Bug > Components: ruby >Affects Versions: 1.9.2 >Reporter: JAEJOON LEE >Priority: Major > Attachments: AVRO-2903.patch > > > Hi > When I use _logstash-codec-avro_schema_registry_, > the following schema always raises an error for validating default. > {code:java} > // json > { > "type": "record", > "name": "RawLog", > ... > "fields": [ > { > "name": "exchangeRate", > "type": "double", > "default": 1.0 > }, > ...{code} > > This is an error message. > {code:java} > Error: Error validating default for exchangeRate: at . expected type double, > got BigDecimal with value 0.1e1 > Exception: Avro::SchemaParseError > Stack: > /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/avro-1.9.2/lib/avro/schema.rb:403:in > `validate_default!' > {code} > > It seems like the default value treated as BigDecimal, but it should be > double. > The plugin code - _logstash-codec-avro_schema_registry_ - , > they just simply use avro lib & schema registry, > hard to find any proper reason why that make a validation error. > > If I put the BigDecimal as default value at validate_simple(), > is it make a sense ? > Please help me and reviews this patch. > > Thanks. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (AVRO-2903) Validation error with a default double value
[ https://issues.apache.org/jira/browse/AVRO-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17162690#comment-17162690 ] Fokko Driesprong commented on AVRO-2903: Thanks [~JayJay] for the report and a patch. Could you open up a PR on Github? > Validation error with a default double value > > > Key: AVRO-2903 > URL: https://issues.apache.org/jira/browse/AVRO-2903 > Project: Apache Avro > Issue Type: Bug > Components: ruby >Affects Versions: 1.9.2 >Reporter: JAEJOON LEE >Priority: Major > Attachments: AVRO-2903.patch > > > Hi > When I use _logstash-codec-avro_schema_registry_, > the following schema always raises an error for validating default. > {code:java} > // json > { > "type": "record", > "name": "RawLog", > ... > "fields": [ > { > "name": "exchangeRate", > "type": "double", > "default": 1.0 > }, > ...{code} > > This is an error message. > {code:java} > Error: Error validating default for exchangeRate: at . expected type double, > got BigDecimal with value 0.1e1 > Exception: Avro::SchemaParseError > Stack: > /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/avro-1.9.2/lib/avro/schema.rb:403:in > `validate_default!' > {code} > > It seems like the default value treated as BigDecimal, but it should be > double. > The plugin code - _logstash-codec-avro_schema_registry_ - , > they just simply use avro lib & schema registry, > hard to find any proper reason why that make a validation error. > > If I put the BigDecimal as default value at validate_simple(), > is it make a sense ? > Please help me and reviews this patch. > > Thanks. -- This message was sent by Atlassian Jira (v8.3.4#803005)