Class ConnectorTablePartitioning
This class was previously name ConnectorNodePartitioning.
The new semantics is more flexible.
It enables expression of more sophisticated table organization.
Node partitioning is a form of partitioning between split groups,
where each split group contains all splits on a Node
.
Unless the connector declares itself as supporting grouped scheduling in
ConnectorSplitManager
, Trino engine treats all splits on a node
as a single split group.
As a result, the connector does not need to provide additional guarantee
as a result of this change for previously-declared node partitioning.
Therefore, this change in SPI is backward compatible.
For now, all splits in each split group must be assigned the same Node
by ConnectorNodePartitioningProvider
.
With future changes to the engine, connectors will no longer be required
to declare a mapping from split groups to nodes.
Artificially requiring such a mapping regardless of whether the engine can
take advantage of the TablePartitioning negatively affects performance.
-
Constructor Summary
ConstructorsConstructorDescriptionConnectorTablePartitioning
(ConnectorPartitioningHandle partitioningHandle, List<ColumnHandle> partitioningColumns) ConnectorTablePartitioning
(ConnectorPartitioningHandle partitioningHandle, List<ColumnHandle> partitioningColumns, boolean singleSplitPerPartition) -
Method Summary
Modifier and TypeMethodDescriptionboolean
The columns used to partition the table across the worker nodes.A handle to the partitioning scheme used to divide the table across worker nodes.int
hashCode()
boolean
-
Constructor Details
-
ConnectorTablePartitioning
public ConnectorTablePartitioning(ConnectorPartitioningHandle partitioningHandle, List<ColumnHandle> partitioningColumns) -
ConnectorTablePartitioning
public ConnectorTablePartitioning(ConnectorPartitioningHandle partitioningHandle, List<ColumnHandle> partitioningColumns, boolean singleSplitPerPartition)
-
-
Method Details
-
getPartitioningHandle
A handle to the partitioning scheme used to divide the table across worker nodes. -
getPartitioningColumns
The columns used to partition the table across the worker nodes. An empty list means the table is entirely contained on a single worker.If the table is node partitioned, the connector guarantees that each combination of values for the distributed columns will be contained within a single worker.
-
isSingleSplitPerPartition
public boolean isSingleSplitPerPartition() -
equals
-
hashCode
-