Uploaded image for project: 'Apache Gora'
  1. Apache Gora
  2. GORA-309

Align data object definition with Avro 1.7.X specification

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.4
    • 1.0
    • gora-compiler, gora-core
    • None

    Description

      Right now in Avro 1.7.6 we can add data to our data bean(s) as follows[0].

      User user1 = new User();
      user1.setName("Alyssa");
      user1.setFavoriteNumber(256);
      // Leave favorite color null

      // Alternate constructor
      User user2 = new User("Ben", 7, "red");

      // Construct via builder
      User user3 = User.newBuilder()
      .setName("Charlie")
      .setFavoriteColor("blue")
      .setFavoriteNumber(null)
      .build();

      In current gora-compiler code we DO NOT shadow this behavior. This issue should enable the flexibility of populating objects as shown in the three use cases above.

      [0] http://avro.apache.org/docs/current/gettingstartedjava.html#Creating+Users

      Attachments

        Activity

          People

            Unassigned Unassigned
            lewismc Lewis John McGibbney
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: