ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Mashenkov <andrey.mashen...@gmail.com>
Subject Re: support for Scala Collection as key?
Date Tue, 05 Jun 2018 14:54:28 GMT
Hi,

Ignite doesn't rely on BinaryObject hashcode or equals method, it use
internal comparison logic instead.
So, it is ok BinaryObject.equals() return true if compared with same object
only.

As Ignite have no hooks for scala collections, they will be handled as
regular user objects.
Let us know if you observer any issues related to incorrect scala
collection objects handling.


AFAIK, there is no plans to add support for scala collections to binary
protocol.
It doesn't looks like trivial task, but anyway feel free to contribute.

On Tue, Jun 5, 2018 at 5:22 PM, haotian.chen <haotian.chen@blackrock.com>
wrote:

> Thanks a lot for the wonderful development on Ignite. I am wondering if
> there
> is any plan to support Scala Collection (e.g. Vector) as key?
>
> There is support for common Java Collection, see here:
> https://github.com/apache/ignite/blob/d4ae653d8018e88847425111321e65
> 3bd558a973/modules/core/src/main/java/org/apache/ignite/
> internal/binary/BinaryContext.java#L320
>
> Scala List seems working fine for me (did not thoroughly test it), but not
> vector. A simple demo here:
>
> val bin = ignite().binary()
> val k1 = Vector(“1”, “2”)
> val k2 = Vector(“1”) ++ Vector(“2”)
> k1 == k2 // true
> binary.toBinary(k1) == binary.toBinary(k2) // false
>
>
> Thanks!
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>



-- 
Best regards,
Andrey V. Mashenkov

Mime
View raw message