System and method for disjunctive joins
AssigneeSnowflake Inc.
InventorsThierry Cruanes, Florian Andreas Funke, Guangyan Hu, Jiaqi Yan
Life of this patent
Estimating the term…
Abstract
Joining data using a disjunctive operator is described. An example computer-implemented method can include receiving a query that includes a first disjunctive predicate involving a first table and a second table. The method may also include determining a first set of rows from the first table and generating a filter from the first set of rows. The method may also further include applying the filter to the second table to generate a second set of rows. Additionally, the method may also include joining the first set of rows and the second set of rows using a first disjunctive operator of the first disjunctive predicate to generate a first results set.
Claims30
A method comprising:
- receiving a query that includes a first disjunctive predicate involving a first table and a second table, wherein the second table includes a plurality of micro-partitions;
- generating a first filter from a first set of rows of the first table, wherein the first filter comprises a range bloom filter;
- applying the first filter to the second table to generate a second set of rows, wherein the first filter removes at least one of the plurality of micro-partitions from processing for the first disjunctive predicate;
- applying a second filter to the second set of rows, wherein the second filter removes at least one of the rows in the second set of rows;
- and
- joining the first set of rows and the filtered second set of rows using a first disjunctive operator of the first disjunctive predicate to generate a first results set.
A non-transitory machine-readable medium storing instructions which, when executed by one or more processors of a computing device, cause the one or more processors to:
- receive a query that includes a first disjunctive predicate involving a first table and a second table, wherein the second table includes a plurality of micro-partitions;
- generate, with the one or more processors, a first filter from the first set of rows, wherein the first filter comprises a range bloom filter;
- apply the first filter to the second table to generate a second set of rows, wherein the first filter removes at least one of the plurality of micro-partitions from processing for the first disjunctive predicate;
- apply a second filter to the second set of rows, wherein the second filter removes at least one of the rows in the second set of rows;
- and
- join the first set of rows and the filtered second set of rows using a first disjunctive operator of the first disjunctive predicate to generate a first results set.
A system comprising:
- a set of storage resources;
- a query processor to,
- receive a query that includes a first disjunctive predicate involving a first table and a second table, the first and second tables stored in the set of storage resources, wherein the second table includes a plurality of micro-partitions,
- generate, with the query processor, a first filter from the first set of rows, wherein the first filter comprises a range bloom filter,
- apply the first filter to the second table to generate a second set of rows, wherein the first filter removes at least one of the plurality of micro-partitions from processing for the first disjunctive predicate,
- apply a second filter to the second set of rows, wherein the second filter removes at least one of the rows in the second set of rows, and
- join the first set of rows and the filtered second set of rows using a first disjunctive operator of the first disjunctive predicate to generate a first results set.
Dependencies are inferred from the claim text.