Conversation
Reached much better compliance with the latest changes:
```
=======================================================
OpenCypher TCK Compliance Report
=======================================================
Total scenarios: 3897
Passed: 1908 (48%)
Failed: 1939 (49%)
Skipped: 50 (1%)
-------------------------------------------------------
By category:
clauses/call 2/ 52 passed (3%)
clauses/create 64/ 78 passed (82%)
clauses/delete 24/ 41 passed (58%)
clauses/match 292/381 passed (76%)
clauses/match-where 25/ 34 passed (73%)
clauses/merge 47/ 75 passed (62%)
clauses/remove 29/ 33 passed (87%)
clauses/return 35/ 63 passed (55%)
clauses/return-orderby 23/ 35 passed (65%)
clauses/return-skip-limit 26/ 31 passed (83%)
clauses/set 30/ 53 passed (56%)
clauses/union 8/ 12 passed (66%)
clauses/unwind 10/ 14 passed (71%)
clauses/with 14/ 29 passed (48%)
clauses/with-orderBy 124/292 passed (42%)
clauses/with-skip-limit 7/ 9 passed (77%)
clauses/with-where 10/ 19 passed (52%)
expressions/aggregation 23/ 35 passed (65%)
expressions/boolean 150/150 passed (100%)
expressions/comparison 36/ 72 passed (50%)
expressions/conditional 13/ 13 passed (100%)
expressions/existentialSubqueries 4/ 10 passed (40%)
expressions/graph 32/ 61 passed (52%)
expressions/list 120/185 passed (64%)
expressions/literals 120/131 passed (91%)
expressions/map 28/ 44 passed (63%)
expressions/mathematical 3/ 6 passed (50%)
expressions/null 44/ 44 passed (100%)
expressions/path 0/ 7 passed (0%)
expressions/pattern 19/ 50 passed (38%)
expressions/precedence 20/121 passed (16%)
expressions/quantifier 478/604 passed (79%)
expressions/string 22/ 32 passed (68%)
expressions/temporal 0/1004 passed (0%)
expressions/typeConversion 19/ 47 passed (40%)
useCases/countingSubgraphMatches 6/ 11 passed (54%)
useCases/triadicSelection 1/ 19 passed (5%)
=======================================================
```
Summary of ChangesHello @lvca, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the OpenCypher implementation by addressing numerous compliance issues identified through TCK tests. It introduces a new list slicing feature, refines the parsing and evaluation of various expressions, and improves the robustness of built-in functions. Additionally, it tightens semantic validation rules and standardizes result formatting, contributing to a more stable and compliant Cypher query engine. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
🧪 CI InsightsHere's what we observed from your CI run for 25d73b7. 🟢 All jobs passed!But CI Insights is watching 👀 |
OpenCypher TCK Compliance Improvements - Code ReviewThank you for this significant improvement to OpenCypher TCK compliance (48% pass rate). This PR implements several critical features for Cypher expression handling. Here's my detailed review: ✅ Strengths1. List Slicing ImplementationThe new
2. List ConcatenationThe arithmetic expression enhancements for list operations are solid:
3. Function Resolution ArchitectureThe function resolver mechanism is a good architectural solution:
4. Semantic Validation EnhancementsGood additions:
|
There was a problem hiding this comment.
Code Review
This pull request introduces a substantial set of fixes and enhancements to the OpenCypher implementation, significantly improving its compliance with the TCK. The changes are well-structured and address several key areas.
The most significant improvement is the refactoring of CypherExpressionBuilder to correctly handle operator precedence using a spine-walk approach, which is a robust solution for expression parsing. This, along with added support for more numeric literal formats (hex, octal, scientific notation) and list slicing, greatly enhances the expression evaluation capabilities.
Function handling has also been improved. The changes in FunctionCallExpression and CypherExecutionPlan to support function execution within complex expressions (like CASE or logical operators) is a critical fix for correctness. The addition of list concatenation with the + operator and the coalesce() function, as well as fixes to keys(), properties(), and size(), are also valuable additions.
The change in result formatting in FinalProjectionStep to align with standard Cypher behavior (where RETURN n yields a result with a column 'n') is a good step towards interoperability, even if it's a breaking change.
Finally, the added semantic validations for variable scopes, boolean operands, and negative SKIP/LIMIT values make the query engine more robust and user-friendly by catching errors early.
Overall, this is a high-quality contribution that makes major strides in the correctness and completeness of the OpenCypher implementation. The code is clean and the changes are well-reasoned.
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3362 +/- ##
==========================================
+ Coverage 61.05% 61.21% +0.15%
==========================================
Files 1165 1166 +1
Lines 78224 78483 +259
Branches 15412 15507 +95
==========================================
+ Hits 47763 48041 +278
+ Misses 23707 23593 -114
- Partials 6754 6849 +95 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
* test: including official opencypher tck
* fix: fixed many issues with opencypher from TCK tests
* fix: fixed broken tests from OpenCyphr TCK
* fix: more opencypher issues from tck tests
* fix: opencypher tck more tests pass now
Reached much better compliance with the latest changes:
```
=======================================================
OpenCypher TCK Compliance Report
=======================================================
Total scenarios: 3897
Passed: 1908 (48%)
Failed: 1939 (49%)
Skipped: 50 (1%)
-------------------------------------------------------
By category:
clauses/call 2/ 52 passed (3%)
clauses/create 64/ 78 passed (82%)
clauses/delete 24/ 41 passed (58%)
clauses/match 292/381 passed (76%)
clauses/match-where 25/ 34 passed (73%)
clauses/merge 47/ 75 passed (62%)
clauses/remove 29/ 33 passed (87%)
clauses/return 35/ 63 passed (55%)
clauses/return-orderby 23/ 35 passed (65%)
clauses/return-skip-limit 26/ 31 passed (83%)
clauses/set 30/ 53 passed (56%)
clauses/union 8/ 12 passed (66%)
clauses/unwind 10/ 14 passed (71%)
clauses/with 14/ 29 passed (48%)
clauses/with-orderBy 124/292 passed (42%)
clauses/with-skip-limit 7/ 9 passed (77%)
clauses/with-where 10/ 19 passed (52%)
expressions/aggregation 23/ 35 passed (65%)
expressions/boolean 150/150 passed (100%)
expressions/comparison 36/ 72 passed (50%)
expressions/conditional 13/ 13 passed (100%)
expressions/existentialSubqueries 4/ 10 passed (40%)
expressions/graph 32/ 61 passed (52%)
expressions/list 120/185 passed (64%)
expressions/literals 120/131 passed (91%)
expressions/map 28/ 44 passed (63%)
expressions/mathematical 3/ 6 passed (50%)
expressions/null 44/ 44 passed (100%)
expressions/path 0/ 7 passed (0%)
expressions/pattern 19/ 50 passed (38%)
expressions/precedence 20/121 passed (16%)
expressions/quantifier 478/604 passed (79%)
expressions/string 22/ 32 passed (68%)
expressions/temporal 0/1004 passed (0%)
expressions/typeConversion 19/ 47 passed (40%)
useCases/countingSubgraphMatches 6/ 11 passed (54%)
useCases/triadicSelection 1/ 19 passed (5%)
=======================================================
```
(cherry picked from commit a8a3f37)
2nd pass, much better.