IP Library › Granted Patent US 12,271,402
Granted Patent B2
US 12,271,402 · App. 17/808,083 · Granted Apr 8, 2025

Method, product, and system to provide a parser for property graph queries with precise error reporting and auto-completion based on information from property graph schemas

Inventors: Florian Gratzer (Mountain View, CA); Oskar Van Rest (Los Gatos, CA); Vlad Ioan Haprian (Zurich, CH); Vasileios Trigonakis (Zurich, CH); Korbinian Schmid (Austin, TX); Steven Serra (Arlington, MA); Sungpack Hong (Palo Alto, CA); Hassan Chafi (Las Vegas, NV)
Assignee: Oracle International Corporation
G06F16/29G06F16/211G06F16/2433
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,271,402
App. No.
17/808,083
Granted
Apr 8, 2025
Kind
B2
Abstract

A method, apparatus, and product to provide a parser for property graph queries with precise error reporting and auto-completion based on information from property graph schemas. The approach generally comprises analysis of graph queries prior to their execution to identify issues prior to execution. In some embodiments, the approach includes any of: use of a property graph schema to determine whether names in a received property graph query exist within a corresponding property graph; determining whether the property graph query includes a comparison of mismatched data types; providing an autocomplete suggestion feature for assistance in resolving errors or corresponding to a cursor position within a query string; or evaluation of a property graph query to determine whether it would return an empty result. In some embodiments, property graph query analysis is performed using a context aware approach.

Claims (69)

1. A computer-implemented method comprising:

receiving, at a user interface, a property graph query directed towards a property graph;

processing, prior to execution of the property graph query against the property graph, the property graph query against a previously stored property graph schema corresponding to the property graph by:

accessing the previously stored property graph schema, wherein the previously stored property graph schema was generated by a property graph schema generator that traversed the property graph to identify relationships in the property graph and represents the relationships in the previously stored property graph schema,

parsing the property graph query using one or more property graph validators to determine whether there is a mismatch between the property graph query and the previously stored property graph schema that was generated by the property graph schema generator that traversed the property graph; and

generating an output for display at the user interface, wherein

when an error in the property graph query is identified due to a mismatch between the property graph query and the previously stored property graph schema that was generated by the property graph schema generator that traversed the property graph, the output comprises an error message and an identification of a location in the property graph query corresponding to the error message, and

when an error in the property graph query is not identified due to a mismatch between the property graph query and the previously stored property graph schema that was generated by the property graph schema generator that traversed the property graph, the output comprises a result of processing the property graph query against the property graph.

2. The method of claim 1 , further comprising, when an error in the property graph query is not identified due to a mismatch between the property graph query and the previously stored property graph schema, determining whether the property graph query would return an empty result using a non-empty results validator by:

processing the property graph query against the previously stored property graph schema to determine if the property graph query maps to a valid context,

analyzing the property graph query against the property graph to determine whether at least one result would be provided in response to executing the property graph query, and

when it is not determined that the property graph query maps to a valid context or it is not determined that at least one result would be provided in response to executing the property graph query the output for display further comprises an error message indicating that the property graph query returns an empty result.

3. The method of claim 1 , wherein parsing the property graph query using one or more property graph validators to determine whether there is a mismatch between the property graph query and the previously stored property graph schema comprises:

tokenizing the property graph query to generate a plurality of tokens,

analyzing, using a label name validator, a first one or more tokens of the plurality of tokens against the previously stored property graph schema to identify any label name mismatches, and

analyzing, using a property name validator, a second one or more tokens of the plurality of tokens against the previously stored property graph schema to identify any property name mismatches.

4. The method of claim 3 , wherein tokens in the previously stored property graph schema are filtered to possible valid properties based on a corresponding vertex or edge prior to analyzing the second one or more tokens of the plurality of tokens against the previously stored property graph schema to identify any property name mismatches.

5. The method of claim 3 , wherein one or more tokens corresponding to one or more errors identified by the label name validator or the property name validator are passed to an autocomplete suggester comprising at least a label name suggester or a property name suggester, and processing the one or more tokens at least by:

identifying one or more valid label names or property names corresponding to the token based on one or more of pattern matching, heuristics, or a ranking schema, and wherein displaying the result for the property graph query further comprises displaying an autocomplete suggestion comprising the one or more valid label names or property names for the property graph query.

6. The method of claim 1 , wherein parsing the property graph query using one or more property graph validators to determine whether there is a mismatch between the property graph query and the previously stored property graph schema comprises:

tokenizing the property graph query to generate a plurality of tokens,

identifying a token of the plurality of tokens comprising a comparison operator, and

analyzing one or more preceding tokens of the plurality of tokens against one or more proceeding tokens of the plurality of tokens against the previously stored property graph schema to identify any data type mismatches.

7. The method of claim 6 , wherein a token of the one or more preceding tokens or the one or more proceeding tokens comprises a function, and a data type of the token is based on a data type of an operand returned by the function.

8. The method of claim 7 , wherein the function is a user-defined function that is evaluated to determine the data type of the operand returned by the function.

9. A non-transitory computer readable medium having stored thereon a sequence of instructions which, when executed by a processor causes a set of acts comprising:

receiving, at a user interface, a property graph query directed towards a property graph;

processing, prior to execution of the property graph query against the property graph, the property graph query against a previously stored property graph schema corresponding to the property graph by:

accessing the previously stored property graph schema, wherein the previously stored property graph schema was generated by a property graph schema generator that traversed the property graph to identify relationships in the property graph and represents the relationships in the previously stored property graph schema,

parsing the property graph query using one or more property graph validators to determine whether there is a mismatch between the property graph query and the previously stored property graph schema that was generated by the property graph schema generator that traversed the property graph; and

generating an output for display at the user interface, wherein

when an error in the property graph query is identified due to a mismatch between the property graph query and the previously stored property graph schema that was generated by the property graph schema generator that traversed the property graph, the output comprises an error message and an identification of a location in the property graph query corresponding to the error message, and

when an error in the property graph query is not identified due to a mismatch between the property graph query and the previously stored property graph schema that was generated by the property graph schema generator that traversed the property graph, the output comprises a result of processing the property graph query against the property graph.

10. The non-transitory computer readable medium of claim 9 , wherein the set of acts further comprise, when an error in the property graph query is not identified due to a mismatch between the property graph query and the previously stored property graph schema, determining whether the property graph query would return an empty result using a non-empty results validator by:

processing the property graph query against the previously stored property graph schema to determine if the property graph query maps to a valid context,

analyzing the property graph query against the property graph to determine whether at least one result would be provided in response to executing the property graph query, and

when it is not determined that the property graph query maps to a valid context or it is not determined that at least one result would be provided in response to executing the property graph query the output for display further comprises an error message indicating that the property graph query returns an empty result.

11. The non-transitory computer readable medium of claim 9 , wherein parsing the property graph query using one or more property graph validators to determine whether there is a mismatch between the property graph query and the previously stored property graph schema comprises:

tokenizing the property graph query to generate a plurality of tokens,

analyzing, using a label name validator, a first one or more tokens of the plurality of tokens against the previously stored property graph schema to identify any label name mismatches, and

analyzing, using a property name validator, a second one or more tokens of the plurality of tokens against the previously stored property graph schema to identify any property name mismatches.

12. The non-transitory computer readable medium of claim 11 , wherein tokens in the previously stored property graph schema are filtered to possible valid properties based on a corresponding vertex or edge prior to analyzing the second one or more tokens of the plurality of tokens against the previously stored property graph schema to identify any property name mismatches.

13. The non-transitory computer readable medium of claim 11 , wherein one or more tokens corresponding to one or more errors identified by the label name validator or the property name validator are passed to an autocomplete suggester comprising at least a label name suggester or a property name suggester, and processing the one or more tokens at least by:

identifying one or more valid label names or property names corresponding to the token based on one or more of pattern matching, heuristics, or a ranking schema, and wherein displaying the result for the property graph query further comprises displaying an autocomplete suggestion comprising the one or more valid label names or property names for the property graph query.

14. The non-transitory computer readable medium of claim 9 , wherein parsing the property graph query using one or more property graph validators to determine whether there is a mismatch between the property graph query and the previously stored property graph schema comprises:

tokenizing the property graph query to generate a plurality of tokens,

identifying a token of the plurality of tokens comprising a comparison operator, and

analyzing one or more preceding tokens of the plurality of tokens against one or more proceeding tokens of the plurality of tokens against the previously stored property graph schema to identify any data type mismatches.

15. The non-transitory computer readable medium of claim 14 , wherein a token of the one or more preceding tokens or the one or more proceeding tokens comprises a function, and a data type of the token is based on a data type of an operand returned by the function.

16. The non-transitory computer readable medium of claim 15 , wherein the function is a user-defined function that is evaluated to determine the data type of the operand returned by the function.

17. A computing system comprising:

a memory to hold a set of instructions;

a computer processor to execute the set of instructions, which when executed cause a set of acts comprising:

receiving, at a user interface, a property graph query directed towards a property graph;

processing, prior to execution of the property graph query against the property graph, the property graph query against a previously stored property graph schema corresponding to the property graph by:

accessing the previously stored property graph schema, wherein the previously stored property graph schema was generated by a property graph schema generator that traversed the property graph to identify relationships in the property graph and represents the relationships in the previously stored property graph schema,

parsing the property graph query using one or more property graph validators to determine whether there is a mismatch between the property graph query and the previously stored property graph schema that was generated by the property graph schema generator that traversed the property graph; and

generating an output for display at the user interface, wherein

when an error in the property graph query is identified due to a mismatch between the property graph query and the previously stored property graph schema that was generated by the property graph schema generator that traversed the property graph, the output comprises an error message and an identification of a location in the property graph query corresponding to the error message, and

when an error in the property graph query is not identified due to a mismatch between the property graph query and the previously stored property graph schema that was generated by the property graph schema generator that traversed the property graph, the output comprises a result of processing the property graph query against the property graph.

18. The computing system of claim 17 , wherein the set of acts further comprise, when an error in the property graph query is not identified due to a mismatch between the property graph query and the previously stored property graph schema, determining whether the property graph query would return an empty result using a non-empty results validator by:

processing the property graph query against the previously stored property graph schema to determine if the property graph query maps to a valid context,

analyzing the property graph query against the property graph to determine whether at least one result would be provided in response to executing the property graph query, and

when it is not determined that the property graph query maps to a valid context or it is not determined that at least one result would be provided in response to executing the property graph query the output for display further comprises an error message indicating that the property graph query returns an empty result.

19. The computing system of claim 17 , wherein parsing the property graph query using one or more property graph validators to determine whether there is a mismatch between the property graph query and the previously stored property graph schema comprises:

tokenizing the property graph query to generate a plurality of tokens,

analyzing, using a label name validator, a first one or more tokens of the plurality of tokens against the previously stored property graph schema to identify any label name mismatches, and

analyzing, using a property name validator, a second one or more tokens of the plurality of tokens against the previously stored property graph schema to identify any property name mismatches.

20. The computing system of claim 19 , wherein tokens in the previously stored property graph schema are filtered to possible valid properties based on a corresponding vertex or edge prior to analyzing the second one or more tokens of the plurality of tokens against the previously stored property graph schema to identify any property name mismatches.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 22, 2022
From: GRATZER, FLORIAN; VAN REST, OSKAR; HAPRIAN, VLAD IOAN; TRIGONAKIS, VASILEIOS; SCHMID, KORBINIAN; SERRA, STEVEN; HONG, SUNGPACK; CHAFI, HASSAN
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 060268/0339 →
Continuity (1)
Related Publication 20230409610A1 · Dec 21, 2023
References Cited (73)
US 5805863A · Chang · 1998 [cited by applicant]
US 5822587A · Mcdonald et al. · 1998 [cited by applicant]
US 6883161B1 · Chovin et al. · 2005 [cited by applicant]
US 6922830B1 · Schmidt · 2005 [cited by applicant]
US 7478375B1 · Kersters · 2009 [cited by applicant]
US 8037108B1 · Chang · 2011 [cited by applicant]
US 8910134B2 · Hong et al. · 2014 [cited by applicant]
US 8949811B2 · Murthy · 2015 [cited by applicant]
US 10614126B2 · Van Rest et al. · 2020 [cited by applicant]
US 11620311B1 · Kumar · 2023 [cited by examiner]
US 20040128661A1 · Ghosh et al. · 2004 [cited by applicant]
US 20040133747A1 · Coldewey · 2004 [cited by applicant]
US 20050278451A1 · Yamashita · 2005 [cited by applicant]
US 20050289125A1 · Liu et al. · 2005 [cited by applicant]
US 20070192306A1 · Papakonstantinou et al. · 2007 [cited by applicant]
US 20100023700A1 · Chen et al. · 2010 [cited by applicant]
US 20100169758A1 · Thomsen et al. · 2010 [cited by applicant]
US 20110055819A1 · Doyle et al. · 2011 [cited by applicant]
US 20110099541A1 · Blomstedt et al. · 2011 [cited by applicant]
US 20110138190A1 · Chase · 2011 [cited by examiner]
US 20110138369A1 · Chandra et al. · 2011 [cited by applicant]
US 20110239197A1 · Dayan et al. · 2011 [cited by applicant]
US 20110276962A1 · Chambers et al. · 2011 [cited by applicant]
US 20130031536A1 · De et al. · 2013 [cited by applicant]
US 20130097136A1 · Goldberg · 2013 [cited by applicant]
US 20130139135A1 · Ditu et al. · 2013 [cited by applicant]
US 20140019949A1 · Craymer · 2014 [cited by applicant]
US 20140189665A1 · Hong et al. · 2014 [cited by applicant]
US 20140282384A1 · Pamer · 2014 [cited by applicant]
US 20140306964A1 · Reddish et al. · 2014 [cited by applicant]
US 20140310619A1 · Fickenwirth et al. · 2014 [cited by applicant]
US 20140325666A1 · Gkoulalas-Divanis et al. · 2014 [cited by applicant]
US 20150007154A1 · Bharadwaj et al. · 2015 [cited by applicant]
US 20150019463A1 · Simard · 2015 [cited by examiner]
US 20150040110A1 · Adl-Tabatabai et al. · 2015 [cited by applicant]
US 20150052175A1 · Bornea et al. · 2015 [cited by applicant]
US 20150067639A1 · Pizlo · 2015 [cited by applicant]
US 20150178405A1 · Hong et al. · 2015 [cited by applicant]
US 20150331683A1 · Sevenich et al. · 2015 [cited by applicant]
US 20150350324A1 · Hu et al. · 2015 [cited by applicant]
US 20150355891A1 · Angerer · 2015 [cited by applicant]
US 20160019228A1 · Hong et al. · 2016 [cited by applicant]
US 20160026680A1 · Banerjee et al. · 2016 [cited by applicant]
US 20160048607A1 · Raman et al. · 2016 [cited by applicant]
US 20160055184A1 · Fokoue-nkoutche et al. · 2016 [cited by applicant]
US 20160062776A1 · Stanfill et al. · 2016 [cited by applicant]
US 20160117358A1 · Schmid et al. · 2016 [cited by applicant]
US 20160171108A1 · Chen · 2016 [cited by examiner]
US 20160179883A1 · Chen · 2016 [cited by examiner]
US 20170024192A1 · Hong et al. · 2017 [cited by applicant]
US 20190370370A1 · Wittern · 2019 [cited by examiner]
US 20200042628A1 · Foo · 2020 [cited by examiner]
US 20210357927A1 · Kita · 2021 [cited by examiner]
US 20230045347A1 · Grady · 2023 [cited by examiner]
“Graph processing with SQL Server andAzure SQL Database,” via The Wayback Machine, dated Oct. 1, 2021. [cited by applicant]
Dolby, “Automatic Inline Allocation of Objects”, Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, dated Jun. 1997, vol. 32, Issue 5, pp. 7-17. [cited by applicant]
Non-Final Office Action for U.S. Appl. No. 14/805,897 dated Feb. 17, 2017. [cited by applicant]
Sevenich et al., “Using Domain-Specific Languages for Analytic Graph Database”, VLDB Endowment, dated Sep. 2016, pp. 1257-4268. [cited by applicant]
Schiller et al., “Efficient Data Structures for Dynamic Graph Analysis”, IEEE, dated Nov. 2015, pp. 497-504. [cited by applicant]
Perez et al., “Ringo: Interactive Graph Analytics on Big-Memory Machines”, ACM, SIGMOD, dated May 2015, 6 pages. [cited by applicant]
Hong et al., “Simplifying Scalable Graph Processing Wraith a Domain-Specific Language”, ADM, CGO'14, pp. 208-218. [cited by applicant]
Hong et al., “Green-Marl: A DSL for Easy and Efficient Graph Analysis”, dated 2012 ACM, ASPLOS'12, pp. 349-362. [cited by applicant]
Hong et al., “Early Experiences in Using a Domain-Specific Language for Large-Scale Graph Analysis”, ACM, Grades, dated 2013, pp. 1-6. [cited by applicant]
Bak et al., “A Reference Interpreter for the Graph Programming Language GP 2”, Proc. Graphs as Models (GaM 2015), vol. 181, dated Apr. 2015, 17 pages. [cited by applicant]
Non-Final Office Action for U.S. Appl. No. 14/805,882 dated Feb. 14, 2016. [cited by applicant]
Notice of Allowance for U.S. Appl. No. 14/805,882 dated Sep. 28, 2016. [cited by applicant]
Notice of Allowance for U.S. Appl. No. 14/805,882 dated May 19, 2016. [cited by applicant]
Interview Summary for U.S. Appl. No. 14/805,897 dated Oct. 26, 2017. [cited by applicant]
Final Office Action for U.S. Appl. No. 14/805,897 dated Sep. 14, 2017. [cited by applicant]
Moran, Brian, “Adding cols. to Large MySQL Tables Quickly”, https:/ Iwww.onehub.com/blog/2009 109 1151 adding -columns-to -largemysql-tables-quickly/, dated Sep. 15, 2009, 7 pages. [cited by applicant]
Notice of Allowance for U.S. Appl. No. 14/805,897 dated Jun. 26, 2018. [cited by applicant]
McKinley et al., “Improving Data Locality with Loop Transformations”, ACM Transactions on Programming Languages and System (TOP LAS), vol. 18 Issue 4, pp. 424-453 (Year: 1996). [cited by applicant]
Advisory Action for U.S. Appl. No. 14/805,897 dated Dec. 20, 2017. [cited by applicant]