US 11,893,016 B1
Secure predicate derivation of queries using metadata
Zixuan Geng, Bellevue, WA (US); Sangyong Hwang, Sammamish, WA (US); and Nitish Jindal, Bellevue, WA (US)
Assigned to Snowflake Inc., Bozeman, MT (US)
Filed by Snowflake Inc., Bozeman, MT (US)
Filed on Oct. 26, 2022, as Appl. No. 18/049,904.
Int. Cl. G06F 16/24 (2019.01); G06F 16/2453 (2019.01)
CPC G06F 16/24542 (2019.01) [G06F 16/24537 (2019.01)] 30 Claims
OG exemplary drawing
 
1. A system comprising:
at least one processor; and
a memory device including instructions, which when executed by the at least one processor, cause the at least one processor to perform operations comprising:
receiving a first query plan, the first query plan including a set of statements, the set of statements including at least one statement with at least a reference to a particular column in a first table;
identifying a first predicate from the at least one statement, the first predicate corresponding to a join operation;
determining, for the particular column, a set of expression properties;
based on the set of expression properties, determining a first derived predicate, the first derived predicate corresponding to a first filter operation;
determining a second derived predicate based at least in part on the first predicate, the second derived predicate corresponding to a second filter operation that is derived based on analyzing the first derived predicate and the set of expression properties;
generating a new operation based on the second derived predicate; and
generating a new query plan based at least in part on the join operation of first predicate, the first derived predicate, and the new operation of the second derived predicate, the new query plan comprising a tree structure with a plurality of nodes,
the new operation, comprising the second filter operation, being included as a first particular node below a second particular node corresponding to the join operation in the tree structure of the new query plan, the first filter operation being included as a third node below the second particular node corresponding to the join operation in the tree structure of the new query plan, and the new operation of the second derived predicate facilitating removing data prior to performing the join operation and thereby reducing utilization of computing resources when executing the new query plan.