US 12,468,702 B2
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 Dec. 29, 2023, as Appl. No. 18/400,760.
Application 18/400,760 is a continuation of application No. 18/049,904, filed on Oct. 26, 2022, granted, now 11,893,016.
Prior Publication US 2024/0143588 A1, May 2, 2024
This patent is subject to a terminal disclaimer.
Int. Cl. G06F 16/24 (2019.01); G06F 16/2453 (2019.01)
CPC G06F 16/24542 (2019.01) [G06F 16/24537 (2019.01)] 21 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, the determining the first derived predicate comprising:
accessing statistical metadata from the set of expression properties; and
determining, using the statistical metadata from the set of expression properties, a particular maximum value from a second column in a second table based on a maximum value of a set of values from the particular column in the first table;
generating a new operation based on the first 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 first derived predicate, the new query plan comprising a tree structure with a plurality of nodes,
the new operation, comprising the first filter operation, being included as a first particular node below a second particular node, the second particular node comprising the join operation from the first query plan, in the tree structure of the new query plan, and the new operation of the first derived predicate facilitating removing data prior to performing the join operation and thereby reducing utilization of computing resources when executing the new query plan.