org.apache.ignite.internal.sql.optimizer.affinity

## Class PartitionTableModel

- java.lang.Object
- - org.apache.ignite.internal.sql.optimizer.affinity.PartitionTableModel

    public class PartitionTableModel
    extends Object

Partition join model. Describes how tables are joined with each other.

### Field Summary

Fields
`static int` `GRP_NONE` Join group which could not be applied (e.g. for "ALL" case).

### Constructor Summary

Constructors
Constructor and Description
`PartitionTableModel()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addExcludedTable(String alias)` Add excluded table
`void` `addJoin(PartitionJoinCondition cond)` Add equi-join condition.
`void` `addTable(PartitionTable tbl, PartitionTableAffinityDescriptor aff)` Add table.
`@Nullable PartitionTableAffinityDescriptor` `joinGroupAffinity(int grpId)` Get affinity descriptor for the group.
`@Nullable PartitionTable` `table(String alias)` Get table by alias.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### GRP_NONE

    public static final int GRP_NONE

Join group which could not be applied (e.g. for "ALL" case).

See Also:
  Constant Field Values

### Constructor Detail

#### PartitionTableModel

    public PartitionTableModel()

### Method Detail

#### addTable

    public void addTable(PartitionTable tbl,
                         PartitionTableAffinityDescriptor aff)

Add table.

Parameters:
  `tbl` - Table.
  `aff` - Affinity descriptor.

#### table

    @Nullable
    public @Nullable PartitionTable table(String alias)

Get table by alias.

Parameters:
  `alias` - Alias.
Returns:
  Table or `null` if it cannot be used for partition pruning.

#### addExcludedTable

    public void addExcludedTable(String alias)

Add excluded table

Parameters:
  `alias` - Alias.

#### addJoin

    public void addJoin(PartitionJoinCondition cond)

Add equi-join condition. Two joined tables may possibly be merged into a single group.

Parameters:
  `cond` - Condition.

#### joinGroupAffinity

    @Nullable
    public @Nullable PartitionTableAffinityDescriptor joinGroupAffinity(int grpId)

Get affinity descriptor for the group.

Parameters:
  `grpId` - Group ID.
Returns:
  Affinity descriptor or `null` if there is no affinity descriptor (e.g. for "NONE" result).

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020