Repository navigation
feat(gql): TCK-verified transformer rework (161 dual-run cases, opengql/tck 190/206) - #93
Conversation
…ql/tck 190/206) Evolution of this extension's translator into a TCK-verified generation, building on the existing scaffold (parser vendoring, build system incl. ANTLR4CPP_STATIC/macOS symbol export, and the original basic.test by @adsharma — kept and evolved). - transformer: ground-up rework — explicit per-statement dispatch, SELECT/GROUP BY/HAVING, writes, transactions/sessions, schema-namespace registry; multi-hop quantified path patterns (bounded expansion, ISO list bindings); exact TRAIL/ACYCLIC/SIMPLE path modes (whole-path predicates where the engine's *ACYCLIC is weaker); value-model bridges for ANY-graph JSON properties (comparison/order/total-order aggregates); narrow GQLSTATUS stamping - loud-rejection policy: unmapped constructs fail fast with 'GQL feature not supported: <construct>' — zero silent wrong answers - tests: 161 dual-run parity cases across 18 suites (evolved from basic.test); opengql/tck harness with three-tier GQLSTATUS assertions and corpus-integrity footnotes — 190/206 green (70 passed + 120 passed-with-note), 9 loud-rejection failures, wrong-GQLSTATUS=0; REPORT.md included - docs: README (graded compatibility matrix, 23 known semantic differences), THIRD_PARTY_NOTICES.md (Apache-2.0 sources the mapping rules were adapted from) - build: +yyjson include + gql_json_functions sources Requires the engine-side enablers in LadybugDB/ladybug#1104.
|
Thanks for the large, well-documented contribution — the loud-rejection policy, dual-run parity suites, and disclosed REPORT.md methodology are the right architecture. I did a read-only review (no compile/test) for correctness, security, and maintainability. One crash-grade blocker plus several majors below; requesting changes on those. Blocker
DASSERT(0 == StructType::getFieldIdx(input.dataType, InternalKeyword::NODES));
auto nodesVector = StructVector::getFieldVector(&input, 0).get();
Majors1. Plus: 418 lines but only 113 unique (305 exact duplicates, e.g. 2. Harness can go green on total failure ( 3. Aggregate vs predicate number ordering disagree ( 4. 5. 6. Delimited labels/aliases emitted verbatim ( head += ":" + sourceText(expr); // Simple label: keep the pattern spelling
Happy to re-review. Suggest merge gates: blocker + items 1–2; items 3–6 can be same-PR fixes or tracked follow-ups, but please don't defer 3–4 silently since predicate/aggregate/sortkey divergence is user-visible. Full read-only finding list (including minors: |
adsharma
left a comment
There was a problem hiding this comment.
Requesting the changes in the previous comment
…rd, exact-decimal min/max, long-number sortkey, to_json non-finite, delimited idents)
… green-on-total-failure), portable e2e discovery, REPORT links opengql/tck#9
… green-on-total-failure), portable e2e discovery, REPORT links opengql/tck#9
…cimalTexts), uncapped self-delimiting sortkey, non-finite to_json guard
… stale machine-local cache, runner regenerates it
…he Transform exit
…elimited-ident funnel), byte-exact copies of run_tck/REPORT/json_functions The API-upload path truncated gql_transformer.cpp at ~600 lines and introduced harmless transcription drift in three files (quote escaping, one trailing space). This commit restores the exact gated tree (self-test 166/166, TCK 70/120/9/7).
|
Thanks for the thorough read-only review — and for the sharp blocker find. Everything is addressed on the branch; final tree is in Blocker —
|
|
Thank you for the contribution! |
Rework of this extension's GQL→Cypher translator into a TCK-verified generation. This builds on the existing scaffold (parser vendoring, build system incl. ANTLR4CPP_STATIC / macOS symbol export / grammar regen script, and the original basic.test — all kept and evolved; scaffold originally contributed by @adsharma).
Tracked in LadybugDB/ladybug#1096.
What's inside
gql_transformer.cpp, ~+10k lines vs the previous generation): explicit per-statement dispatch; SELECT/GROUP BY/HAVING; writes (INSERT/SET/DELETE/REMOVE with order-independence snapshot); transactions/sessions; schema-namespace registry; multi-hop quantified path patterns (bounded expansion, ISO list bindings); exact TRAIL/ACYCLIC/SIMPLE path modes (whole-path predicates where the engine's*ACYCLICis weaker than GQL semantics); value-model bridges for ANY-graph JSON properties (comparison/order/total-order aggregates:_gql_lt/le/gt/ge/eq/ne,_gql_sortkey,_gql_max/min/sum/avg,_gql_to_json); narrow GQLSTATUS stamping.GQL feature not supported: <construct>— zero silent wrong answers. 23 known semantic differences are documented in the README (graded compatibility matrix).test/tck/): corpus vendored & frozen; three-tier GQLSTATUS assertions; corpus-integrity footnotes. Result: 190/206 green (70 passed + 120 passed-with-note), 9 failed (all loud rejections: 4 corpus parse-error issues + 5 design rejections), 7 skipped, wrong-GQLSTATUS = 0.REPORT.mdincluded.README.md(graded matrix + known semantic differences),THIRD_PARTY_NOTICES.md(Apache-2.0 sources the mapping rules were adapted from, e.g. Neo4j Cypher front-end rewriters — registered per file; no GPL/BSL code).gql_json_functionssources; your parser CMakeLists / symbol export lists / grammar regen tooling are untouched.Testing
-Werror): same gates green — 161/161, TCK classification identical (70/120/9/7), full engine regression 1975/1975, 0 failures. Run: 37164343158.Dependency
Requires the engine-side enablers in LadybugDB/ladybug#1104 (catalog function fallback, extension data slots, path variable alias). This PR's CI will stay red until #1104 lands in the core this repo builds against.
License
MIT, consistent with this repo.
THIRD_PARTY_NOTICES.mdtravels with the code (Apache-2.0 obligations for adapted mapping rules).