THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
(P1) OR (P2) => (P1, P2) (P1) OR (ALL) => (ALL) (P1) OR () => (P1) (P1, P2) OR (P2, P3) => (P1, P2, P3) (:1) OR (:2) => (:1, :2) (P1, :1) OR (P2, :2) => (P1, P2, :1, :2) |
Joins represent complex case to analyze. But it is very common, so it is crucial to support them as well.
Important observations:
For REPLICATED caches without we define special term (ANY). It has one property: can be merged with any other expression safely.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
(P1, :2) AND (ANY) => (P1, :2)
(P1, :2) OR (ANY) => (P1, :2) |
Flow:
Create a list of involved caches:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
class TableDescriptor {
String cacheName;
String affColumnName;
// PARTITIONED or REPLICATED
CacheMode cacheMode;
// Actual affinity function, needed to compare two tables in JOIN
AffinityFunction affinityFunc;
// Custom affinity: node filter OR not RendezvousAffinityFunction OR custom AffinityKeyMapper
boolean customAffinity;
// If after left join.
boolean replaceWithAll;
// If REPLICATED with non-custom affinity, so relevant data is everywhere.
boolean replaceWithAny;
} |
TODO
...