[
https://issues.apache.org/jira/browse/IGNITE-17711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17610511#comment-17610511
]
Roman Puchkovskiy commented on IGNITE-17711:
--------------------------------------------
The patch looks good to me
> 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
> Assignee: Aleksandr Polovtcev
> Priority: Minor
> Labels: ignite-3
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> 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)