[
https://issues.apache.org/jira/browse/IGNITE-15532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrey Mashenkov updated IGNITE-15532:
--------------------------------------
Description:
For now. Tuple implementations don't override hashcode/equals methods.
This makes them non-comparable with each other and limits Tuple usage in
Set/Map collections.
But we already use Tuple in that way (see KVBinaryView API).
Let's
* Make all key columns mandatory, otherwise it is impossible to match missed
key columns and columns with a default value.
* Specify requirements to hashcode in method javadoc. Hashcode must be
independent of columns order (uses XOR operation).
* Make external equals/hashcode implementation as a static method of some util
class to reuse it in all Tuple out implementations.
was:
For now. Tuple implementations don't overrides hashcode/equals methods.
This makes them non-comparable with each other and limits Tuple usage in
Set/Map collections.
But we already use Tuple in that way (see KVBinaryView API).
Let's
* Make all key fields mandatory, otherwise it is impossible to match missed key
columns and columns with a default value.
* Specify requirements to hashcode in method javadoc. Hashcode must be
independent of columns order (uses XOR operation).
* Make external equals/hashcode implementation as a static method of some util
class to reuse it in all Tuple out implementations.
> Tuple equality comparison.
> --------------------------
>
> Key: IGNITE-15532
> URL: https://issues.apache.org/jira/browse/IGNITE-15532
> Project: Ignite
> Issue Type: Improvement
> Reporter: Andrey Mashenkov
> Assignee: Andrey Mashenkov
> Priority: Major
> Labels: iep-54, ignite-3
> Fix For: 3.0.0-alpha3
>
>
> For now. Tuple implementations don't override hashcode/equals methods.
> This makes them non-comparable with each other and limits Tuple usage in
> Set/Map collections.
> But we already use Tuple in that way (see KVBinaryView API).
> Let's
> * Make all key columns mandatory, otherwise it is impossible to match missed
> key columns and columns with a default value.
> * Specify requirements to hashcode in method javadoc. Hashcode must be
> independent of columns order (uses XOR operation).
> * Make external equals/hashcode implementation as a static method of some
> util class to reuse it in all Tuple out implementations.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)