US 11,704,309 B2
Selective use of data structure operations for path query evaluation
Andrew J. Carter, Kirkland, WA (US); Yiming Yang, Danville, CA (US); Jiajun Yao, San Jose, CA (US); Siddharth Shah, Pittsburgh, PA (US); Dhruvesh Rathore, San Francisco, CA (US); and Tiance Liang, Mountain View, CA (US)
Assigned to Microsoft Technology Licensing, LLC, Redmond, WA (US)
Filed by Microsoft Technology Licensing, LLC, Redmond, WA (US)
Filed on Jun. 29, 2021, as Appl. No. 17/362,907.
Prior Publication US 2022/0414092 A1, Dec. 29, 2022
Int. Cl. G06F 16/24 (2019.01); G06F 16/242 (2019.01); G06F 16/2453 (2019.01)
CPC G06F 16/2425 (2019.01) [G06F 16/2453 (2019.01)] 16 Claims
OG exemplary drawing
 
1. A method comprising:
reading a query that traverses at least two nodes and at least one edge of a graph in a graph database;
compiling the query into a set of variables and a set of constraints, the set of variables and the set of constraints corresponding to the at least two nodes and the at least one edge of the graph;
creating an in-memory data structure comprising at least one table;
using the set of variables and the set of constraints, determining an operation that is performable using the in-memory data structure;
checking for an existence of a condition relating to the in-memory data structure or the operation;
if the condition exists, skipping the operation;
if the condition does not exist, executing the operation;
storing a set of intermediate query results in the at least one table;
wherein checking for the existence of the condition comprises determining whether the in-memory data structure comprises a nested disjunction that includes at least one disjunctive child table that has zero rows;
if the in-memory data structure comprises a nested disjunction that includes at least one disjunctive child table that has zero rows, the condition exists and skipping the operation comprises skipping a path consistency checking operation; and
if the in-memory data structure does not comprise a nested disjunction that includes at least one disjunctive child table that has zero rows, the condition does not exist and executing the operation comprises executing a path consistency checking operation;
wherein the method is performed by at least one computing device.