🤖 AI Summary
GQL (the ISO standard for graph querying) lacks native support for expressing monotonic edge-value constraints along paths, representing a fundamental expressiveness gap in its pattern-matching capabilities. To address this, we propose a constructive graph compilation technique that encodes ordering constraints directly into the graph structure—enabling existing GQL engines to evaluate such queries without syntactic extensions. Our approach integrates structural graph transformation, logical expressibility analysis, and Cypher-specific optimization, and is deeply embedded within the Neo4j runtime. Theoretically, this work closes a long-standing expressiveness gap in GQL concerning path-ordered constraints. Practically, it delivers substantial query performance improvements on real-world workloads, eliminating timeout failures observed with naïve implementations. By bridging formal database theory with industrial graph query engine design, our method advances both the theoretical foundations and practical applicability of standardized graph querying.
📝 Abstract
Pattern matching of core GQL, the new ISO standard for querying property graphs, cannot check whether edge values are increasing along a path, as established in recent work. We present a construc- tive translation that overcomes this limitation by compiling the increasing-edges condition into the input graph. Remarkably, the benefit of this construction goes beyond restoring expressiveness. In our proof-of-concept implementation in Neo4j's Cypher, where such path constraints are expressible but costly, our compiled version runs faster and avoids timeouts. This illustrates how a theoretically motivated translation can not only close an expressiveness gap but also bring practical performance gains.