US 12,072,887 B1
Optimizing an operator flow for performing filtering based on new columns values via a database system
Sarah Kate Schieferstein, Chicago, IL (US); and Andrew Park, St. Charles, IL (US)
Assigned to Ocient Holdings LLC, Chicago, IL (US)
Filed by Ocient Holdings LLC, Chicago, IL (US)
Filed on May 1, 2023, as Appl. No. 18/309,897.
Int. Cl. G06F 16/2455 (2019.01); G06F 16/22 (2019.01); G06F 16/2453 (2019.01)
CPC G06F 16/24553 (2019.01) [G06F 16/221 (2019.01); G06F 16/24542 (2019.01)] 19 Claims
OG exemplary drawing
 
1. A method for execution by at least one processor of a database system, comprising:
generating an initial query operator execution flow for a corresponding query for execution that includes an extend operation for execution serially before a column-based filtering operation indicating filtering by new column values of a new column generated via the extend operation as a first function of at least one existing column;
converting the initial query operator execution flow into an updated query operator execution flow semantically equivalent to the initial query operator execution flow based on: generating an updated column-based filtering operation to filter by existing column values of the at least one existing column via applying a first inverse function of the first function, wherein the column-based filtering operation of the initial query operator execution flow indicates the filtering by the new column values based on indicating filtering to emit only rows satisfying a first Boolean expression indicating comparison of the new column values to a literal value, and wherein the updated column-based filtering operation of the updated query operator execution flow is updated from the column-based filtering operation of the initial query operator execution flow to indicate the filtering by the existing column values based on indicating filtering to emit only rows satisfying a second Boolean expression indicating comparison of the existing column values to output of the first inverse function applied to the literal value, and wherein the second Boolean expression is semantically equivalent with the first Boolean expression based on the first inverse function being an inverse function of the first function; and
pushing the updated column-based filtering operation for execution serially before the extend operation; and
executing the corresponding query by applying the updated query operator execution flow based on:
executing the updated column-based filtering operation upon a plurality of rows to generate a filtered subset of the plurality of rows; and
executing the extend operation upon only rows in the filtered subset of the plurality of rows to generate the new column values for rows in the filtered subset of the plurality of rows.