You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Aleksandr Polovtcev (Jira)" <ji...@apache.org> on 2022/09/18 17:57:00 UTC

[jira] [Updated] (IGNITE-17711) Change Binary Tuple Prefix format to allow comparison without deserialization

     [ https://issues.apache.org/jira/browse/IGNITE-17711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksandr Polovtcev updated IGNITE-17711:
-----------------------------------------
    Description: BinaryTuplePrefix format dictates that the number of prefix elements are appended to the end of the tuple. This is currently implemented as inserting an extra int element which also implies an extra entry in the offset map and non-deterministic size of this element (it can occupy from 1 to 4 bytes). This was done for the sake of simplicity but it also has an implication: it is not possible to simply compare it with a BinaryTuple byte-by-byte in order to determine if a given prefix matches a given tuple. A better approach would be to append the number of elements directly as the last two bytes (or four, if necessary) of the tuple, bypassing the entry table. This way we can discard the last two bytes and compare the prefix and the tuple on a per-byte basis.

> Change Binary Tuple Prefix format to allow comparison without deserialization
> -----------------------------------------------------------------------------
>
>                 Key: IGNITE-17711
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17711
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Aleksandr Polovtcev
>            Priority: Minor
>
> BinaryTuplePrefix format dictates that the number of prefix elements are appended to the end of the tuple. This is currently implemented as inserting an extra int element which also implies an extra entry in the offset map and non-deterministic size of this element (it can occupy from 1 to 4 bytes). This was done for the sake of simplicity but it also has an implication: it is not possible to simply compare it with a BinaryTuple byte-by-byte in order to determine if a given prefix matches a given tuple. A better approach would be to append the number of elements directly as the last two bytes (or four, if necessary) of the tuple, bypassing the entry table. This way we can discard the last two bytes and compare the prefix and the tuple on a per-byte basis.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)