Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-2874

Certain Avro generated getters/setters not recognized

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9.1, 0.9.0, 0.10.0
    • Fix Version/s: 0.9, 0.10.0
    • Component/s: None
    • Labels:
      None

      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

        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;
        }
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ukarlsson Ulf Karlsson
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified