Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-6128

Binary: offsets might be skipped for constant-length fields

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Component/s: binary
    • Labels:

      Description

      Currently we write offsets for every field. It could take 1, 2 or 4 bytes depending on the data length of the object. Now suppose we have the following class:

      class MyClass {
          int a;
          String c;
          long b;
          int d;
          int e;
      }
      

      Fields are always sorted in alphabetical order, so we will write them as follows [a, b, c, d, e], and their offsets would always be [0, 5, 14, X, X+5]. As you see, instead of writing 5 offsets, it is enough to write only one offset of a field, which follows another variable-length field. The rest offsets could be saved to metadata.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vozerov Vladimir Ozerov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: