Class ApplyPreferredTableWriterPartitioning
java.lang.Object
io.trino.sql.planner.iterative.rule.ApplyPreferredTableWriterPartitioning
- All Implemented Interfaces:
Rule<TableWriterNode>
Rule verifies if preconditions for using preferred write partitioning are met:
- expected number of partitions to be written (based on table stat) is greater
than or equal to preferred_write_partitioning_min_number_of_partitions session property,
- use_preferred_write_partitioning is set to true.
If precondition are met the
TableWriterNode is modified to mark the intention to use preferred write partitioning:
value of TableWriterNode.getPreferredPartitioningScheme() is set as result of TableWriterNode.getPartitioningScheme().-
Nested Class Summary
Nested classes/interfaces inherited from interface io.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(TableWriterNode node, Captures captures, Rule.Context context) Returns a pattern to which plan nodes this rule applies.boolean
-
Field Details
-
WRITER_NODE_WITH_PREFERRED_PARTITIONING
-
-
Constructor Details
-
ApplyPreferredTableWriterPartitioning
public ApplyPreferredTableWriterPartitioning()
-
-
Method Details
-
getPattern
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<TableWriterNode>
-
isEnabled
- Specified by:
isEnabledin interfaceRule<TableWriterNode>
-
apply
- Specified by:
applyin interfaceRule<TableWriterNode>
-