[jira] [Updated] (FLINK-2874) Certain Avro generated getters/setters not recognized
[ https://issues.apache.org/jira/browse/FLINK-2874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ulf Karlsson updated FLINK-2874: Description: For Avro schemas where value null is not allowed, the field is unboxed e.g. int but the getter/setter methods provide the boxed Integer as interface: ``` { "fields": [ { "type": "double", "name": "time" }, } ``` This results in Java {code} private double time; public java.lang.Double getTime() { return time; } public void setTime(java.lang.Double value) { this.time = value; } {code} There is also a problem when there is an underscore in the Avro schema, e.g.: {code} { "default": null, "type": [ "null", "long" ], "name": "conn_id" }, {code} This results in Java: {code} private java.lang.Long conn_id; public java.lang.Long getConnId() { return conn_id; } public void setConnId(java.lang.Long value) { this.conn_id = value; } {code} was: For Avro schemas where value null is not allowed, the field is unboxed e.g. int but the getter/setter methods provide the boxed Integer as interface: ``` { "fields": [ { "type": "double", "name": "time" }, } ``` This results in Java ``` private double time; public java.lang.Double getTime() { return time; } public void setTime(java.lang.Double value) { this.time = value; } ``` There is also a problem when there is an underscore in the Avro schema, e.g.: ``` { "default": null, "type": [ "null", "long" ], "name": "conn_id" }, ``` This results in Java: ``` private java.lang.Long conn_id; public java.lang.Long getConnId() { return conn_id; } public void setConnId(java.lang.Long value) { this.conn_id = value; } ``` > Certain Avro generated getters/setters not recognized > - > > Key: FLINK-2874 > URL: https://issues.apache.org/jira/browse/FLINK-2874 > Project: Flink > Issue Type: Bug > Components: Core >Affects Versions: 0.9.1, 0.9.0, 0.10 >Reporter: Ulf Karlsson >Priority: Minor > Original Estimate: 2h > Remaining Estimate: 2h > > For Avro schemas where value null is not allowed, the field is unboxed e.g. > int but the getter/setter methods provide the boxed Integer as interface: > ``` > { > "fields": [ > { >"type": "double", >"name": "time" > }, > } > ``` > This results in Java > {code} > private double time; > public java.lang.Double getTime() { > return time; > } > public void setTime(java.lang.Double value) { > this.time = value; > } > {code} > There is also a problem when there is an underscore in the Avro schema, e.g.: > {code} > { >"default": null, >"type": [ > "null", > "long" >], >"name": "conn_id" > }, > {code} > This results in Java: > {code} > private java.lang.Long conn_id; > public java.lang.Long getConnId() { > return conn_id; > } > public void setConnId(java.lang.Long value) { > this.conn_id = value; > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (FLINK-2874) Certain Avro generated getters/setters not recognized
[ https://issues.apache.org/jira/browse/FLINK-2874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ulf Karlsson updated FLINK-2874: Description: For Avro schemas where value null is not allowed, the field is unboxed e.g. int but the getter/setter methods provide the boxed Integer as interface: {code} { "fields": [ { "type": "double", "name": "time" }, } {code} This results in Java {code} private double time; public java.lang.Double getTime() { return time; } public void setTime(java.lang.Double value) { this.time = value; } {code} There is also a problem when there is an underscore in the Avro schema, e.g.: {code} { "default": null, "type": [ "null", "long" ], "name": "conn_id" }, {code} This results in Java: {code} private java.lang.Long conn_id; public java.lang.Long getConnId() { return conn_id; } public void setConnId(java.lang.Long value) { this.conn_id = value; } {code} was: For Avro schemas where value null is not allowed, the field is unboxed e.g. int but the getter/setter methods provide the boxed Integer as interface: ``` { "fields": [ { "type": "double", "name": "time" }, } ``` This results in Java {code} private double time; public java.lang.Double getTime() { return time; } public void setTime(java.lang.Double value) { this.time = value; } {code} There is also a problem when there is an underscore in the Avro schema, e.g.: {code} { "default": null, "type": [ "null", "long" ], "name": "conn_id" }, {code} This results in Java: {code} private java.lang.Long conn_id; public java.lang.Long getConnId() { return conn_id; } public void setConnId(java.lang.Long value) { this.conn_id = value; } {code} > Certain Avro generated getters/setters not recognized > - > > Key: FLINK-2874 > URL: https://issues.apache.org/jira/browse/FLINK-2874 > Project: Flink > Issue Type: Bug > Components: Core >Affects Versions: 0.9.1, 0.9.0, 0.10 >Reporter: Ulf Karlsson >Priority: Minor > Original Estimate: 2h > Remaining Estimate: 2h > > For Avro schemas where value null is not allowed, the field is unboxed e.g. > int but the getter/setter methods provide the boxed Integer as interface: > {code} > { > "fields": [ > { >"type": "double", >"name": "time" > }, > } > {code} > This results in Java > {code} > private double time; > public java.lang.Double getTime() { > return time; > } > public void setTime(java.lang.Double value) { > this.time = value; > } > {code} > There is also a problem when there is an underscore in the Avro schema, e.g.: > {code} > { >"default": null, >"type": [ > "null", > "long" >], >"name": "conn_id" > }, > {code} > This results in Java: > {code} > private java.lang.Long conn_id; > public java.lang.Long getConnId() { > return conn_id; > } > public void setConnId(java.lang.Long value) { > this.conn_id = value; > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)