ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergi Vladykin <sergi.vlady...@gmail.com>
Subject Distributed SQL joins affinity key configuration
Date Mon, 12 Oct 2015 20:44:15 GMT

I'm about to finish distributed SQL joins feature for Ignite and we need to
what to do with configuration because currently I don't see how to change
it and
not to brake backward compatibility.

Currently we declare SQL schema for cache using indexedTypes with
or CacheTypeMetadata. Now we will need to specify affinity key field name
for every type.
By default if it is not specified we will assume that it is a *_KEY* field
which is actual
cache key at SQL layer.

I know about two ways to specify affinity keys in IgniteCache:

1. Using @AffinityKeyMapped to annotate fields or methods inside of cache
key class.

We could use it in SQL as is but there is a possible problem: if user did
not specify
@QuerySqlField annotation for that field. It may be was done intentionally
by mistake. The code which should start a distributed join for this case
throw exception as I understand.

2. Using custom AffinityKeyMapper which allows to extract affinity key from

With it we can extract affinity key from cache key, but for SQL we need a
affinity field name. Probably we need additional method affinityKeyName() or
something like that but it will brake backward compatibility.



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message