ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ozerov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-6128) Binary: offsets might be skipped for constant-length fields
Date Mon, 21 Aug 2017 12:05:00 GMT
Vladimir Ozerov created IGNITE-6128:

             Summary: Binary: offsets might be skipped for constant-length fields
                 Key: IGNITE-6128
                 URL: https://issues.apache.org/jira/browse/IGNITE-6128
             Project: Ignite
          Issue Type: Task
          Components: binary
    Affects Versions: 2.1
            Reporter: Vladimir Ozerov
             Fix For: 2.3

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.

This message was sent by Atlassian JIRA

View raw message