IP Library Granted Patent US 10,509,783
Granted Patent B1
US 10,509,783 · App. 15/488,879 · Granted Dec 17, 2019

Dynamic partition selection

Inventors: Lyublena Rosenova Antova (Sunnyvale, CA); Amr El-Helw (San Mateo, CA); Mohamed F. Soliman (San Mateo, CA); Zhongxian Gu (Davis, CA); Michail Petropoulos (San Francisco, CA); Florian Michael Waas (San Francisco, CA)
Assignee: Pivotal Software, Inc.
G06F16/24542G06F16/24537G06F16/24554G06F16/27G06F16/9024G06F16/9027
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,509,783
App. No.
15/488,879
Granted
Dec 17, 2019
Kind
B1
Abstract

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for dynamic partition selection. One of the methods includes receiving a representation of a query plan generated for a query, wherein the query plan includes a dynamic scan operator that represents a first computing node obtaining tuples of one or more partitions of a table from storage and transferring the tuples to a second computing node that executes a parent operator of the dynamic scan operator. A partition selector operator is generated corresponding to the dynamic scan operator. A location in the query plan is determined for the partition selector operator. A modified query plan is generated having the partition selector operator at the determined location.

Claims (69)

1. A system comprising one or more computers and one or more storage devices storing instructions that are operable, when executed by the one or more computers, to perform operations comprising:

receiving a representation of a query plan generated for a query, the query plan comprising a first plurality of operators that, when executed by one or more computing nodes, cause the one or more computing nodes to compute a result for the query, wherein the first plurality of operators in the query plan includes a select operator and a dynamic scan operator, wherein the dynamic scan operator represents a first computing node obtaining tuples from a table that is partitioned into a plurality of partitions by a partitioning key and transferring the tuples to a second computing node that executes a parent operator of the dynamic scan operator;

generating a partition selector operator corresponding to the dynamic scan operator, wherein the partition selector operator represents a third computing node that executes the partition selector operator including determining one or more partition identifiers of partitions of the table and transferring the one or more partition identifiers to the dynamic scan operator of the first computing node;

determining a location in the query plan for the partition selector operator relative to the select operator, including:

determining that the select operator includes a predicate expression on the partitioning key of the table;

in response to determining that the select operator includes a predicate expression on the partitioning key of the table, annotating the partition selector operator with the predicate expression from the select operator; and

pushing the partition selector operator to a child operator of the select operator; and

generating a modified query plan having the partition selector operator at the determined location, wherein the modified query plan includes a second plurality of operators that, when executed by one or more computing nodes, cause the one or more computing nodes to compute a result for the query using the partition selector operator including determining, from the predicate expression and a partition selection function, one or more partitions of the table having a range of tuples on the partitioning key that satisfies the predicate expression.

2. The system of claim 1 , wherein:

the partition selector operator comprises one or more second predicate expressions; and

annotating the partition selector operator with the predicate expression from the select operator comprises annotating the partition selector operator with a conjunction of the predicate expression from the select operator and the one or more second predicate expressions.

3. The system of claim 1 , the operations comprising:

determining that the table is a multilevel partitioned table with multiple partitioning keys including the partitioning key; and

determining, for each partitioning key in the multiple partitioning keys, a set of predicate expressions, wherein:

annotating the partition selector operator with the predicate expression from the select operator comprises annotating the partition selector operator with a set of predicate expressions for each partitioning key in the multiple partitioning keys, and

determining, from the predicate expression and the partition selection function, one or more partitions of the table having a range of tuples on the partitioning key that satisfies the predicate expression determining, by providing each predicate set of predicate expressions as input to the partition selection function, one or more partitions of the table having a range of tuples with respective values that satisfy each of the predicate expressions in the set of predicate expressions.

4. The system of claim 1 , the operations comprising receiving, at the select operator, the partition selector operator.

5. The system of claim 4 , wherein determining the location in the query plan for the partition selector operator relative to the select operator comprises:

determining, for each operator of a subset of operators in the query plan, whether the dynamic scan operator occurs in a subtree of the query plan that is rooted at the respective operator of the subset of operators;

determining that the dynamic scan operator occurs in a subtree rooted at a particular operator of the subset of operators; and

in response to determining that the dynamic scan operator occurs in a subtree rooted at the particular operator of the subset of operators, pushing the partition selector operator to a child operator of the particular operator, wherein the child operator indicates the location for the partition selector operator in the query plan, the operations comprising determining that the dynamic scan operator occurs in a subtree rooted at the select operator from the subset of operators, wherein pushing the partition selector operator to the child operator of the select operator is responsive to determining that the dynamic scan operator occurs in a subtree rooted at the select operator from the subset of operators.

6. The system of claim 5 , wherein determining that the dynamic scan operator occurs in a subtree rooted at a particular operator of the subset of operators comprises determining that the dynamic scan operator occurs in a subtree rooted at a join operator that computes pairs of first tuples of the table and second tuples of a second table that have matching values.

7. The system of claim 6 , the operations comprising:

determining that the partition selector operator includes a predicate expression on a partitioning key; and

in response to determining that the partition selector operator includes a predicate expression on a partitioning key, pushing the partition selector operator to an outer child operator of the join operator.

8. The system of claim 1 , wherein the query plan is represented as a graph, wherein each operator in the query plan is a node in the graph, and wherein each edge between a first graph node and a second graph node in the graph represents a first computing node, that executes a first operator represented by the first graph node, transferring output of the first operator to a second computing node that executes a second operator represented by the second graph node.

9. A computer-implemented method comprising:

receiving a representation of a query plan generated for a query, the query plan comprising a first plurality of operators that, when executed by one or more computing nodes, cause the one or more computing nodes to compute a result for the query, wherein the first plurality of operators in the query plan includes a select operator and a dynamic scan operator, wherein the dynamic scan operator represents a first computing node obtaining tuples from a table that is partitioned into a plurality of partitions by a partitioning key and transferring the tuples to a second computing node that executes a parent operator of the dynamic scan operator;

generating a partition selector operator corresponding to the dynamic scan operator, wherein the partition selector operator represents a third computing node that executes the partition selector operator including determining one or more partition identifiers of partitions of the table and transferring the one or more partition identifiers to the dynamic scan operator of the first computing node;

determining a location in the query plan for the partition selector operator relative to the select operator, including:

determining that the select operator includes a predicate expression on the partitioning key of the table;

in response to determining that the select operator includes a predicate expression on the partitioning key of the table, annotating the partition selector operator with the predicate expression from the select operator; and

pushing the partition selector operator to a child operator of the select operator; and

generating a modified query plan having the partition selector operator at the determined location, wherein the modified query plan includes a second plurality of operators that, when executed by one or more computing nodes, cause the one or more computing nodes to compute a result for the query using the partition selector operator including determining, from the predicate expression and a partition selection function, one or more partitions of the table having a range of tuples on the partitioning key that satisfies the predicate expression.

10. The method of claim 9 , wherein:

the partition selector operator comprises one or more second predicate expressions; and

annotating the partition selector operator with the predicate expression from the select operator comprises annotating the partition selector operator with a conjunction of the predicate expression from the select operator and the one or more second predicate expressions.

11. The method of claim 9 , comprising:

determining that the table is a multilevel partitioned table with multiple partitioning keys including the partitioning key; and

determining, for each partitioning key in the multiple partitioning keys, a set of predicate expressions, wherein:

annotating the partition selector operator with the predicate expression from the select operator comprises annotating the partition selector operator with a set of predicate expressions for each partitioning key in the multiple partitioning keys, and

determining, from the predicate expression and the partition selection function, one or more partitions of the table having a range of tuples on the partitioning key that satisfies the predicate expression determining, by providing each predicate set of predicate expressions as input to the partition selection function, one or more partitions of the table having a range of tuples with respective values that satisfy each of the predicate expressions in the set of predicate expressions.

12. The method of claim 9 , comprising receiving, at the select operator, the partition selector operator.

13. The method of claim 12 , wherein determining the location in the query plan for the partition selector operator relative to the select operator comprises:

determining, for each operator of a subset of operators in the query plan, whether the dynamic scan operator occurs in a subtree of the query plan that is rooted at the respective operator of the subset of operators;

determining that the dynamic scan operator occurs in a subtree rooted at a particular operator of the subset of operators; and

in response to determining that the dynamic scan operator occurs in a subtree rooted at the particular operator of the subset of operators, pushing the partition selector operator to a child operator of the particular operator, wherein the child operator indicates the location for the partition selector operator in the query plan, the method comprising determining that the dynamic scan operator occurs in a subtree rooted at the select operator from the subset of operators, wherein pushing the partition selector operator to the child operator of the select operator is responsive to determining that the dynamic scan operator occurs in a subtree rooted at the select operator from the subset of operators.

14. The method of claim 13 , wherein determining that the dynamic scan operator occurs in a subtree rooted at a particular operator of the subset of operators comprises determining that the dynamic scan operator occurs in a subtree rooted at a join operator that computes pairs of first tuples of the table and second tuples of a second table that have matching values.

15. The method of claim 14 , comprising:

determining that the partition selector operator includes a predicate expression on a partitioning key; and

in response to determining that the partition selector operator includes a predicate expression on a partitioning key, pushing the partition selector operator to an outer child operator of the join operator.

16. The method of claim 9 , wherein the query plan is represented as a graph, wherein each operator in the query plan is a node in the graph, and wherein each edge between a first graph node and a second graph node in the graph represents a first computing node, that executes a first operator represented by the first graph node, transferring output of the first operator to a second computing node that executes a second operator represented by the second graph node.

17. A computer program product, encoded on one or more non-transitory computer storage media, comprising instructions that when executed by one or more computers cause the one or more computers to perform operations comprising:

receiving a representation of a query plan generated for a query, the query plan comprising a first plurality of operators that, when executed by one or more computing nodes, cause the one or more computing nodes to compute a result for the query, wherein the first plurality of operators in the query plan includes a select operator and a dynamic scan operator, wherein the dynamic scan operator represents a first computing node obtaining tuples from a table that is partitioned into a plurality of partitions by a partitioning key and transferring the tuples to a second computing node that executes a parent operator of the dynamic scan operator;

generating a partition selector operator corresponding to the dynamic scan operator, wherein the partition selector operator represents a third computing node that executes the partition selector operator including determining one or more partition identifiers of partitions of the table and transferring the one or more partition identifiers to the dynamic scan operator of the first computing node;

determining a location in the query plan for the partition selector operator relative to the select operator, including:

determining that the select operator includes a predicate expression on the partitioning key of the table;

in response to determining that the select operator includes a predicate expression on the partitioning key of the table, annotating the partition selector operator with the predicate expression from the select operator; and

pushing the partition selector operator to a child operator of the select operator; and

generating a modified query plan having the partition selector operator at the determined location, wherein the modified query plan includes a second plurality of operators that, when executed by one or more computing nodes, cause the one or more computing nodes to compute a result for the query using the partition selector operator including determining, from the predicate expression and a partition selection function, one or more partitions of the table having a range of tuples on the partitioning key that satisfies the predicate expression.

18. The computer program product of claim 17 , wherein:

the partition selector operator comprises one or more second predicate expressions; and

annotating the partition selector operator with the predicate expression from the select operator comprises annotating the partition selector operator with a conjunction of the predicate expression from the select operator and the one or more second predicate expressions.

19. The computer program product of claim 17 , the operations comprising:

determining that the table is a multilevel partitioned table with multiple partitioning keys including the partitioning key; and

determining, for each partitioning key in the multiple partitioning keys, a set of predicate expressions, wherein:

annotating the partition selector operator with the predicate expression from the select operator comprises annotating the partition selector operator with a set of predicate expressions for each partitioning key in the multiple partitioning keys, and

determining, from the predicate expression and the partition selection function, one or more partitions of the table having a range of tuples on the partitioning key that satisfies the predicate expression determining, by providing each predicate set of predicate expressions as input to the partition selection function, one or more partitions of the table having a range of tuples with respective values that satisfy each of the predicate expressions in the set of predicate expressions.

20. The computer program product of claim 17 , the operations comprising receiving, at the select operator, the partition selector operator.

Assignments (2)
MERGER Recorded May 20, 2026
From: PIVOTAL SOFTWARE, INC.
To: VMWARE LLC
Reel/Frame 075613/0593 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 6, 2018
From: ANTOVA, LYUBLENA ROSENOVA; EL-HELW, AMR; SOLIMAN, MOHAMED F.; GU, ZHONGXIAN; PETROPOULOS, MICHAIL; WAAS, FLORIAN MICHAEL
To: PIVOTAL SOFTWARE, INC.
Reel/Frame 045119/0933 →
Continuity (1)
Continuation 14314863 · Jun 25, 2014