SlideShare une entreprise Scribd logo
1  sur  34
Télécharger pour lire hors ligne
openCypher TCK
András Zsámboki, Gábor Szárnyas, József Marton
TCK Overview
openCypher TCK
The project aims to deliver four types of artifacts:
1. Cypher Reference Documentation
2. Grammar specification
3. TCK (Technology Compatibility Kit)
4. Cypher language specification
openCypher TCK
The project aims to deliver four types of artifacts:
1. Cypher Reference Documentation
2. Grammar specification
3. TCK (Technology Compatibility Kit)
4. Cypher language specification
Cucumber tests
Scenario: Find all nodes
Given an empty graph
And having executed:
"""
CREATE ({name: 'a'}),
({name: 'b'})
"""
When executing query:
"""
MATCH (n)
RETURN n
"""
Then the result should be:
| n |
| ({name: 'a'}) |
| ({name: 'b'}) |
And no side effects
Cucumber tests
Scenario: Find all nodes
Given an empty graph
And having executed:
"""
CREATE ({name: 'a'}),
({name: 'b'})
"""
When executing query:
"""
MATCH (n)
RETURN n
"""
Then the result should be:
| n |
| ({name: 'a'}) |
| ({name: 'b'}) |
And no side effects feature results
Cucumber tests
Scenario: Find all nodes
Given an empty graph
And having executed:
"""
CREATE ({name: 'a'}),
({name: 'b'})
"""
When executing query:
"""
MATCH (n)
RETURN n
"""
Then the result should be:
| n |
| ({name: 'a'}) |
| ({name: 'b'}) |
And no side effects feature results
grammar FeatureResults;
value : node
| relationship
| path
| integer
...
;
node : nodeDesc ;
nodeDesc : '(' (label)* WS? (propertyMap)? ')' ;
relationship : relationshipDesc ;
relationshipDesc : '[' relationshipType WS?
(propertyMap)? ']' ;
path : '<' pathBody '>' ;
pathBody : nodeDesc (pathLink)* ;
FeatureResults.g4
Side effects
Scenario: Create a pattern with multiple hops
Given an empty graph
When executing query:
"""
CREATE (:A)-[:R]->(:B)-[:R]->(:C)
"""
Then the result should be empty
And the side effects should be:
| +nodes | 3 |
| +relationships | 2 |
| +labels | 3 |
When executing control query:
"""
MATCH (a:A)-[:R]->(b:B)-[:R]->(c:C)
RETURN a, b, c
"""
Then the result should be:
| a | b | c |
| (:A) | (:B) | (:C) |
Side effects
Scenario: Create a pattern with multiple hops
Given an empty graph
When executing query:
"""
CREATE (:A)-[:R]->(:B)-[:R]->(:C)
"""
Then the result should be empty
And the side effects should be:
| +nodes | 3 |
| +relationships | 2 |
| +labels | 3 |
When executing control query:
"""
MATCH (a:A)-[:R]->(b:B)-[:R]->(c:C)
RETURN a, b, c
"""
Then the result should be:
| a | b | c |
| (:A) | (:B) | (:C) |
+nodes
+relationships
+labels
+properties
Exceptions
Background:
Given any graph
Scenario: Using a non-existent function
When executing query:
"""
MATCH (a)
RETURN foo(a)
"""
Then a SyntaxError should be raised at compile time: UnknownFunction
Exceptions
Background:
Given any graph
Scenario: Using a non-existent function
When executing query:
"""
MATCH (a)
RETURN foo(a)
"""
Then a SyntaxError should be raised at compile time: UnknownFunction
~50 features and ~800 scenarios
TCK for the Neo4j Driver
Project goal
ingraph
TCK test executor
Project goal
ingraph
TCK test executor
Architecture
Neo4j server
test client
TCK test executor
Neo4j driver
restart
Architecture
Neo4j server
test client
TCK test executor
Neo4j driver
restart
test client
Architecture
Neo4j embedded
TCK test executor
Neo4j driver
Converting from Embedded to Driver
Architecture
FeatureResults
grammar (Xtext)
Gradle
Cucumber
Scala
Cukes
test client
Neo4j embedded
TCK test executor
Neo4j driver
Result
matchers
Generated report
Generated
Cucumber report
Points to Discuss
Side effects
Scenario: Create a pattern with multiple hops
Given an empty graph
When executing query:
"""
CREATE (:A)-[:R]->(:B)-[:R]->(:C)
"""
Then the result should be empty
And the side effects should be:
| +nodes | 3 |
| +relationships | 2 |
| +labels | 3 |
When executing control query:
"""
MATCH (a:A)-[:R]->(b:B)-[:R]->(c:C)
RETURN a, b, c
"""
Then the result should be:
| a | b | c |
| (:A) | (:B) | (:C) |
+nodes
+relationships
+labels
+properties
Calculating side effects
 org.neo4j.graphdb.QueryStatistics
Side effects for properties
Scenario: Non-existent values in a property map are removed with SET =
Given any graph
And having executed:
"""
CREATE (:X {foo: 'A', bar: 'B'})
"""
When executing query:
"""
MATCH (n:X {foo: 'A'})
SET n = {foo: 'B', baz: 'C'}
RETURN n
"""
Then the result should be:
| n |
| (:X {foo: 'B', baz: 'C'}) |
And the side effects should be:
| +properties | 2 |
| -properties | 1 |
:X
foo: 'B'
baz: 'C'
:X
foo: 'A'
bar: 'B'
openCypher/issues/221
Side effects with Cypher queries
MATCH (n)
RETURN n
MATCH ()-[r]->()
RETURN r
±nodes
±relationships
Idea: an openCypher-compatible engine should support
standard Cypher, so use queries to determine side effects
Side effects with Cypher queries
MATCH (n)
UNWIND labels(n) AS label
RETURN DISTINCT label
±labels
MATCH (n)
UNWIND keys(n) AS key
RETURN key
-property
MATCH (n)
UNWIND keys(n) AS key
WITH properties(n) AS properties
RETURN key, properties[key] AS value
+property
Properties considering nodes and relationships
MATCH (n)
UNWIND keys(n) AS key
RETURN key
UNION ALL
MATCH ()-[r]->()
UNWIND keys(r) AS key
RETURN key
MATCH (n)
UNWIND keys(n) AS key
WITH properties(n) AS properties, key
RETURN key, properties[key] AS value
UNION ALL
MATCH ()-[r]->()
UNWIND keys(r) AS key
WITH properties(r) AS properties, key
RETURN key, properties[key] AS value
-property +property
𝑘𝑖−1 ∖ 𝑘𝑖 𝑘𝑣𝑖 ∖ 𝑘𝑣𝑖−1
Unobservable behaviour
CREATE (n)
DELETE n
RETURN id(n)
MATCH (n)
SET n.x = 1
WITH n
SET n.x = NULL
Created 1 node, deleted 1 node, started streaming 1 record after 17 ms and completed after 18 ms.
Set 2 properties, statement completed in 1 ms.
License considerations
 Nep4j Embedded: GPLv3
 Neo4j Driver: ASLv2
 openCypher: ASLv2
 ingraph: EPLv1
License considerations
 Nep4j Embedded: GPLv3
 Neo4j Driver: ASLv2
 openCypher: ASLv2
 ingraph: EPLv1
TCK to relational algebra
 Gábor Szárnyas, József Marton: Formalisation of openCypher
Queries in Relational Algebra (Extended Version)
TCK to relational algebra
 Gábor Szárnyas, József Marton: Formalisation of openCypher
Queries in Relational Algebra (Extended Version)
only testing compilation
Summary
 Complex toolchain for testing
o Cucumber & Gradle plug-in
o Feature parser
o Test database
 Points to discuss
o What is the precise semantics of changes?
o Check for all behaviour or only observable changes?
o What license to use?
o Insert +types?
o Potential CIRs?
Related resources
 Repository:
github.com/bme-db-lab/opencypher-tck-tests
 Cucumber test reports:
bme-db-lab.github.io/opencypher-tck-tests/feature-overview.html
 Technical report:
docs.inf.mit.bme.hu/ingraph/pub/opencypher-report.pdf
 Discussion on observability:
github.com/opencypher/openCypher/issues/221
 Using ImpermanentGraphDatabase from Gradle:
github.com/neo4j/neo4j/issues/8796
 GraphAware testing framework:
github.com/graphaware/neo4j-framework/tree/master/tests

Contenu connexe

Tendances

2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CSAAKASH KUMAR
 
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CSAAKASH KUMAR
 
Probability of finding a single qubit in a state
Probability of finding a single qubit in a stateProbability of finding a single qubit in a state
Probability of finding a single qubit in a stateVijayananda Mohire
 
Infix prefix postfix
Infix prefix postfixInfix prefix postfix
Infix prefix postfixSelf-Employed
 
Infix to Prefix (Conversion, Evaluation, Code)
Infix to Prefix (Conversion, Evaluation, Code)Infix to Prefix (Conversion, Evaluation, Code)
Infix to Prefix (Conversion, Evaluation, Code)Ahmed Khateeb
 
When RV Meets CEP (RV 2016 Tutorial)
When RV Meets CEP (RV 2016 Tutorial)When RV Meets CEP (RV 2016 Tutorial)
When RV Meets CEP (RV 2016 Tutorial)Sylvain Hallé
 
Altitude San Francisco 2018: WebAssembly Tools & Applications
Altitude San Francisco 2018: WebAssembly Tools & ApplicationsAltitude San Francisco 2018: WebAssembly Tools & Applications
Altitude San Francisco 2018: WebAssembly Tools & ApplicationsFastly
 
Делаем пользовательское Api на базе Shapeless
Делаем пользовательское Api на базе ShapelessДелаем пользовательское Api на базе Shapeless
Делаем пользовательское Api на базе ShapelessВадим Челышов
 
The Ring programming language version 1.3 book - Part 25 of 88
The Ring programming language version 1.3 book - Part 25 of 88The Ring programming language version 1.3 book - Part 25 of 88
The Ring programming language version 1.3 book - Part 25 of 88Mahmoud Samir Fayed
 
RxJS - The Reactive extensions for JavaScript
RxJS - The Reactive extensions for JavaScriptRxJS - The Reactive extensions for JavaScript
RxJS - The Reactive extensions for JavaScriptViliam Elischer
 
"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)
"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)
"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)AvitoTech
 
C programs Set 2
C programs Set 2C programs Set 2
C programs Set 2Koshy Geoji
 

Tendances (20)

C# 8 and Beyond
C# 8 and BeyondC# 8 and Beyond
C# 8 and Beyond
 
Concept of c
Concept of cConcept of c
Concept of c
 
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
 
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
 
Probability of finding a single qubit in a state
Probability of finding a single qubit in a stateProbability of finding a single qubit in a state
Probability of finding a single qubit in a state
 
Infix prefix postfix
Infix prefix postfixInfix prefix postfix
Infix prefix postfix
 
Infix to Prefix (Conversion, Evaluation, Code)
Infix to Prefix (Conversion, Evaluation, Code)Infix to Prefix (Conversion, Evaluation, Code)
Infix to Prefix (Conversion, Evaluation, Code)
 
When RV Meets CEP (RV 2016 Tutorial)
When RV Meets CEP (RV 2016 Tutorial)When RV Meets CEP (RV 2016 Tutorial)
When RV Meets CEP (RV 2016 Tutorial)
 
Exp 3
Exp 3Exp 3
Exp 3
 
Altitude San Francisco 2018: WebAssembly Tools & Applications
Altitude San Francisco 2018: WebAssembly Tools & ApplicationsAltitude San Francisco 2018: WebAssembly Tools & Applications
Altitude San Francisco 2018: WebAssembly Tools & Applications
 
Делаем пользовательское Api на базе Shapeless
Делаем пользовательское Api на базе ShapelessДелаем пользовательское Api на базе Shapeless
Делаем пользовательское Api на базе Shapeless
 
C++20 features
C++20 features C++20 features
C++20 features
 
The Ring programming language version 1.3 book - Part 25 of 88
The Ring programming language version 1.3 book - Part 25 of 88The Ring programming language version 1.3 book - Part 25 of 88
The Ring programming language version 1.3 book - Part 25 of 88
 
Flink meetup
Flink meetupFlink meetup
Flink meetup
 
RxJS - The Reactive extensions for JavaScript
RxJS - The Reactive extensions for JavaScriptRxJS - The Reactive extensions for JavaScript
RxJS - The Reactive extensions for JavaScript
 
"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)
"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)
"О некоторых особенностях Objective-C++" Влад Михайленко (Maps.Me)
 
Null, the Abyss
Null, the AbyssNull, the Abyss
Null, the Abyss
 
C programs Set 2
C programs Set 2C programs Set 2
C programs Set 2
 
Functions
FunctionsFunctions
Functions
 
Shan
ShanShan
Shan
 

Similaire à openCypher Technology Compatibility Kit (TCK)

Seductions of Scala
Seductions of ScalaSeductions of Scala
Seductions of ScalaDean Wampler
 
Class 11: Deeper List Procedures
Class 11: Deeper List ProceduresClass 11: Deeper List Procedures
Class 11: Deeper List ProceduresDavid Evans
 
Hands on Training – Graph Database with Neo4j
Hands on Training – Graph Database with Neo4jHands on Training – Graph Database with Neo4j
Hands on Training – Graph Database with Neo4jSerendio Inc.
 
Exploring Koltin on Android
Exploring Koltin on AndroidExploring Koltin on Android
Exploring Koltin on AndroidDeepanshu Madan
 
Pythonic Graphics
Pythonic GraphicsPythonic Graphics
Pythonic GraphicsKirby Urner
 
Subtle Asynchrony by Jeff Hammond
Subtle Asynchrony by Jeff HammondSubtle Asynchrony by Jeff Hammond
Subtle Asynchrony by Jeff HammondPatrick Diehl
 
The Ring programming language version 1.5.3 book - Part 89 of 184
The Ring programming language version 1.5.3 book - Part 89 of 184The Ring programming language version 1.5.3 book - Part 89 of 184
The Ring programming language version 1.5.3 book - Part 89 of 184Mahmoud Samir Fayed
 
lldb – Debugger auf Abwegen
lldb – Debugger auf Abwegenlldb – Debugger auf Abwegen
lldb – Debugger auf Abwegeninovex GmbH
 
Real Time Big Data Management
Real Time Big Data ManagementReal Time Big Data Management
Real Time Big Data ManagementAlbert Bifet
 
RedisConf18 - Lower Latency Graph Queries in Cypher with Redis Graph
RedisConf18 - Lower Latency Graph Queries in Cypher with Redis GraphRedisConf18 - Lower Latency Graph Queries in Cypher with Redis Graph
RedisConf18 - Lower Latency Graph Queries in Cypher with Redis GraphRedis Labs
 
Pointcuts and Analysis
Pointcuts and AnalysisPointcuts and Analysis
Pointcuts and AnalysisWiwat Ruengmee
 
openCypher: Technology Compatibility Kit (TCK) and Vendor Extensions
openCypher: Technology Compatibility Kit (TCK) and Vendor ExtensionsopenCypher: Technology Compatibility Kit (TCK) and Vendor Extensions
openCypher: Technology Compatibility Kit (TCK) and Vendor ExtensionsopenCypher
 
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...GeeksLab Odessa
 
Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012Leonardo Borges
 
The Ring programming language version 1.6 book - Part 183 of 189
The Ring programming language version 1.6 book - Part 183 of 189The Ring programming language version 1.6 book - Part 183 of 189
The Ring programming language version 1.6 book - Part 183 of 189Mahmoud Samir Fayed
 
Effecting Pure Change - How anything ever gets done in functional programming...
Effecting Pure Change - How anything ever gets done in functional programming...Effecting Pure Change - How anything ever gets done in functional programming...
Effecting Pure Change - How anything ever gets done in functional programming...Tech Triveni
 
Cocoaheads Meetup / Alex Zimin / Swift magic
Cocoaheads Meetup / Alex Zimin / Swift magicCocoaheads Meetup / Alex Zimin / Swift magic
Cocoaheads Meetup / Alex Zimin / Swift magicBadoo Development
 

Similaire à openCypher Technology Compatibility Kit (TCK) (20)

Seductions of Scala
Seductions of ScalaSeductions of Scala
Seductions of Scala
 
Class 11: Deeper List Procedures
Class 11: Deeper List ProceduresClass 11: Deeper List Procedures
Class 11: Deeper List Procedures
 
Hands on Training – Graph Database with Neo4j
Hands on Training – Graph Database with Neo4jHands on Training – Graph Database with Neo4j
Hands on Training – Graph Database with Neo4j
 
Exploring Koltin on Android
Exploring Koltin on AndroidExploring Koltin on Android
Exploring Koltin on Android
 
Pythonic Graphics
Pythonic GraphicsPythonic Graphics
Pythonic Graphics
 
Subtle Asynchrony by Jeff Hammond
Subtle Asynchrony by Jeff HammondSubtle Asynchrony by Jeff Hammond
Subtle Asynchrony by Jeff Hammond
 
The Ring programming language version 1.5.3 book - Part 89 of 184
The Ring programming language version 1.5.3 book - Part 89 of 184The Ring programming language version 1.5.3 book - Part 89 of 184
The Ring programming language version 1.5.3 book - Part 89 of 184
 
lldb – Debugger auf Abwegen
lldb – Debugger auf Abwegenlldb – Debugger auf Abwegen
lldb – Debugger auf Abwegen
 
Real Time Big Data Management
Real Time Big Data ManagementReal Time Big Data Management
Real Time Big Data Management
 
RedisConf18 - Lower Latency Graph Queries in Cypher with Redis Graph
RedisConf18 - Lower Latency Graph Queries in Cypher with Redis GraphRedisConf18 - Lower Latency Graph Queries in Cypher with Redis Graph
RedisConf18 - Lower Latency Graph Queries in Cypher with Redis Graph
 
Pointcuts and Analysis
Pointcuts and AnalysisPointcuts and Analysis
Pointcuts and Analysis
 
R Language Introduction
R Language IntroductionR Language Introduction
R Language Introduction
 
openCypher: Technology Compatibility Kit (TCK) and Vendor Extensions
openCypher: Technology Compatibility Kit (TCK) and Vendor ExtensionsopenCypher: Technology Compatibility Kit (TCK) and Vendor Extensions
openCypher: Technology Compatibility Kit (TCK) and Vendor Extensions
 
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
 
Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012
 
R/C++ talk at earl 2014
R/C++ talk at earl 2014R/C++ talk at earl 2014
R/C++ talk at earl 2014
 
The Ring programming language version 1.6 book - Part 183 of 189
The Ring programming language version 1.6 book - Part 183 of 189The Ring programming language version 1.6 book - Part 183 of 189
The Ring programming language version 1.6 book - Part 183 of 189
 
Effecting Pure Change - How anything ever gets done in functional programming...
Effecting Pure Change - How anything ever gets done in functional programming...Effecting Pure Change - How anything ever gets done in functional programming...
Effecting Pure Change - How anything ever gets done in functional programming...
 
Monadic parsers in C++
Monadic parsers in C++Monadic parsers in C++
Monadic parsers in C++
 
Cocoaheads Meetup / Alex Zimin / Swift magic
Cocoaheads Meetup / Alex Zimin / Swift magicCocoaheads Meetup / Alex Zimin / Swift magic
Cocoaheads Meetup / Alex Zimin / Swift magic
 

Plus de openCypher

Learning Timed Automata with Cypher
Learning Timed Automata with CypherLearning Timed Automata with Cypher
Learning Timed Automata with CypheropenCypher
 
Incremental View Maintenance for openCypher Queries
Incremental View Maintenance for openCypher QueriesIncremental View Maintenance for openCypher Queries
Incremental View Maintenance for openCypher QueriesopenCypher
 
Formal semantics for Cypher queries and updates
Formal semantics for Cypher queries and updatesFormal semantics for Cypher queries and updates
Formal semantics for Cypher queries and updatesopenCypher
 
Cypher.PL: an executable specification of Cypher semantics
Cypher.PL: an executable specification of Cypher semanticsCypher.PL: an executable specification of Cypher semantics
Cypher.PL: an executable specification of Cypher semanticsopenCypher
 
Multiple Graphs: Updatable Views
Multiple Graphs: Updatable ViewsMultiple Graphs: Updatable Views
Multiple Graphs: Updatable ViewsopenCypher
 
Micro-Servicing Linked Data
Micro-Servicing Linked DataMicro-Servicing Linked Data
Micro-Servicing Linked DataopenCypher
 
Graph abstraction
Graph abstractionGraph abstraction
Graph abstractionopenCypher
 
From Cypher 9 to GQL: Conceptual overview of multiple named graphs and compos...
From Cypher 9 to GQL: Conceptual overview of multiple named graphs and compos...From Cypher 9 to GQL: Conceptual overview of multiple named graphs and compos...
From Cypher 9 to GQL: Conceptual overview of multiple named graphs and compos...openCypher
 
Cypher for Gremlin
Cypher for GremlinCypher for Gremlin
Cypher for GremlinopenCypher
 
Comparing PGQL, G-Core and Cypher
Comparing PGQL, G-Core and CypherComparing PGQL, G-Core and Cypher
Comparing PGQL, G-Core and CypheropenCypher
 
Multiple graphs in openCypher
Multiple graphs in openCypherMultiple graphs in openCypher
Multiple graphs in openCypheropenCypher
 
Eighth openCypher Implementers Group Meeting: Status Update
Eighth openCypher Implementers Group Meeting: Status UpdateEighth openCypher Implementers Group Meeting: Status Update
Eighth openCypher Implementers Group Meeting: Status UpdateopenCypher
 
Cypher for Gremlin
Cypher for GremlinCypher for Gremlin
Cypher for GremlinopenCypher
 
Supporting dates and times in Cypher
Supporting dates and times in CypherSupporting dates and times in Cypher
Supporting dates and times in CypheropenCypher
 
Seventh openCypher Implementers Group Meeting: Status Update
Seventh openCypher Implementers Group Meeting: Status UpdateSeventh openCypher Implementers Group Meeting: Status Update
Seventh openCypher Implementers Group Meeting: Status UpdateopenCypher
 
Academic research on graph processing: connecting recent findings to industri...
Academic research on graph processing: connecting recent findings to industri...Academic research on graph processing: connecting recent findings to industri...
Academic research on graph processing: connecting recent findings to industri...openCypher
 
Property Graphs with Time
Property Graphs with TimeProperty Graphs with Time
Property Graphs with TimeopenCypher
 
Cypher.PL: Executable Specification of Cypher written in Prolog
Cypher.PL: Executable Specification of Cypher written in PrologCypher.PL: Executable Specification of Cypher written in Prolog
Cypher.PL: Executable Specification of Cypher written in PrologopenCypher
 
Use case: processing multiple graphs
Use case: processing multiple graphsUse case: processing multiple graphs
Use case: processing multiple graphsopenCypher
 
Cypher Editor in the Web
Cypher Editor in the WebCypher Editor in the Web
Cypher Editor in the WebopenCypher
 

Plus de openCypher (20)

Learning Timed Automata with Cypher
Learning Timed Automata with CypherLearning Timed Automata with Cypher
Learning Timed Automata with Cypher
 
Incremental View Maintenance for openCypher Queries
Incremental View Maintenance for openCypher QueriesIncremental View Maintenance for openCypher Queries
Incremental View Maintenance for openCypher Queries
 
Formal semantics for Cypher queries and updates
Formal semantics for Cypher queries and updatesFormal semantics for Cypher queries and updates
Formal semantics for Cypher queries and updates
 
Cypher.PL: an executable specification of Cypher semantics
Cypher.PL: an executable specification of Cypher semanticsCypher.PL: an executable specification of Cypher semantics
Cypher.PL: an executable specification of Cypher semantics
 
Multiple Graphs: Updatable Views
Multiple Graphs: Updatable ViewsMultiple Graphs: Updatable Views
Multiple Graphs: Updatable Views
 
Micro-Servicing Linked Data
Micro-Servicing Linked DataMicro-Servicing Linked Data
Micro-Servicing Linked Data
 
Graph abstraction
Graph abstractionGraph abstraction
Graph abstraction
 
From Cypher 9 to GQL: Conceptual overview of multiple named graphs and compos...
From Cypher 9 to GQL: Conceptual overview of multiple named graphs and compos...From Cypher 9 to GQL: Conceptual overview of multiple named graphs and compos...
From Cypher 9 to GQL: Conceptual overview of multiple named graphs and compos...
 
Cypher for Gremlin
Cypher for GremlinCypher for Gremlin
Cypher for Gremlin
 
Comparing PGQL, G-Core and Cypher
Comparing PGQL, G-Core and CypherComparing PGQL, G-Core and Cypher
Comparing PGQL, G-Core and Cypher
 
Multiple graphs in openCypher
Multiple graphs in openCypherMultiple graphs in openCypher
Multiple graphs in openCypher
 
Eighth openCypher Implementers Group Meeting: Status Update
Eighth openCypher Implementers Group Meeting: Status UpdateEighth openCypher Implementers Group Meeting: Status Update
Eighth openCypher Implementers Group Meeting: Status Update
 
Cypher for Gremlin
Cypher for GremlinCypher for Gremlin
Cypher for Gremlin
 
Supporting dates and times in Cypher
Supporting dates and times in CypherSupporting dates and times in Cypher
Supporting dates and times in Cypher
 
Seventh openCypher Implementers Group Meeting: Status Update
Seventh openCypher Implementers Group Meeting: Status UpdateSeventh openCypher Implementers Group Meeting: Status Update
Seventh openCypher Implementers Group Meeting: Status Update
 
Academic research on graph processing: connecting recent findings to industri...
Academic research on graph processing: connecting recent findings to industri...Academic research on graph processing: connecting recent findings to industri...
Academic research on graph processing: connecting recent findings to industri...
 
Property Graphs with Time
Property Graphs with TimeProperty Graphs with Time
Property Graphs with Time
 
Cypher.PL: Executable Specification of Cypher written in Prolog
Cypher.PL: Executable Specification of Cypher written in PrologCypher.PL: Executable Specification of Cypher written in Prolog
Cypher.PL: Executable Specification of Cypher written in Prolog
 
Use case: processing multiple graphs
Use case: processing multiple graphsUse case: processing multiple graphs
Use case: processing multiple graphs
 
Cypher Editor in the Web
Cypher Editor in the WebCypher Editor in the Web
Cypher Editor in the Web
 

Dernier

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Dernier (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

openCypher Technology Compatibility Kit (TCK)

  • 1. openCypher TCK András Zsámboki, Gábor Szárnyas, József Marton
  • 3. openCypher TCK The project aims to deliver four types of artifacts: 1. Cypher Reference Documentation 2. Grammar specification 3. TCK (Technology Compatibility Kit) 4. Cypher language specification
  • 4. openCypher TCK The project aims to deliver four types of artifacts: 1. Cypher Reference Documentation 2. Grammar specification 3. TCK (Technology Compatibility Kit) 4. Cypher language specification
  • 5. Cucumber tests Scenario: Find all nodes Given an empty graph And having executed: """ CREATE ({name: 'a'}), ({name: 'b'}) """ When executing query: """ MATCH (n) RETURN n """ Then the result should be: | n | | ({name: 'a'}) | | ({name: 'b'}) | And no side effects
  • 6. Cucumber tests Scenario: Find all nodes Given an empty graph And having executed: """ CREATE ({name: 'a'}), ({name: 'b'}) """ When executing query: """ MATCH (n) RETURN n """ Then the result should be: | n | | ({name: 'a'}) | | ({name: 'b'}) | And no side effects feature results
  • 7. Cucumber tests Scenario: Find all nodes Given an empty graph And having executed: """ CREATE ({name: 'a'}), ({name: 'b'}) """ When executing query: """ MATCH (n) RETURN n """ Then the result should be: | n | | ({name: 'a'}) | | ({name: 'b'}) | And no side effects feature results grammar FeatureResults; value : node | relationship | path | integer ... ; node : nodeDesc ; nodeDesc : '(' (label)* WS? (propertyMap)? ')' ; relationship : relationshipDesc ; relationshipDesc : '[' relationshipType WS? (propertyMap)? ']' ; path : '<' pathBody '>' ; pathBody : nodeDesc (pathLink)* ; FeatureResults.g4
  • 8. Side effects Scenario: Create a pattern with multiple hops Given an empty graph When executing query: """ CREATE (:A)-[:R]->(:B)-[:R]->(:C) """ Then the result should be empty And the side effects should be: | +nodes | 3 | | +relationships | 2 | | +labels | 3 | When executing control query: """ MATCH (a:A)-[:R]->(b:B)-[:R]->(c:C) RETURN a, b, c """ Then the result should be: | a | b | c | | (:A) | (:B) | (:C) |
  • 9. Side effects Scenario: Create a pattern with multiple hops Given an empty graph When executing query: """ CREATE (:A)-[:R]->(:B)-[:R]->(:C) """ Then the result should be empty And the side effects should be: | +nodes | 3 | | +relationships | 2 | | +labels | 3 | When executing control query: """ MATCH (a:A)-[:R]->(b:B)-[:R]->(c:C) RETURN a, b, c """ Then the result should be: | a | b | c | | (:A) | (:B) | (:C) | +nodes +relationships +labels +properties
  • 10. Exceptions Background: Given any graph Scenario: Using a non-existent function When executing query: """ MATCH (a) RETURN foo(a) """ Then a SyntaxError should be raised at compile time: UnknownFunction
  • 11. Exceptions Background: Given any graph Scenario: Using a non-existent function When executing query: """ MATCH (a) RETURN foo(a) """ Then a SyntaxError should be raised at compile time: UnknownFunction ~50 features and ~800 scenarios
  • 12. TCK for the Neo4j Driver
  • 15. Architecture Neo4j server test client TCK test executor Neo4j driver restart
  • 16. Architecture Neo4j server test client TCK test executor Neo4j driver restart
  • 17. test client Architecture Neo4j embedded TCK test executor Neo4j driver
  • 19. Architecture FeatureResults grammar (Xtext) Gradle Cucumber Scala Cukes test client Neo4j embedded TCK test executor Neo4j driver Result matchers
  • 22. Side effects Scenario: Create a pattern with multiple hops Given an empty graph When executing query: """ CREATE (:A)-[:R]->(:B)-[:R]->(:C) """ Then the result should be empty And the side effects should be: | +nodes | 3 | | +relationships | 2 | | +labels | 3 | When executing control query: """ MATCH (a:A)-[:R]->(b:B)-[:R]->(c:C) RETURN a, b, c """ Then the result should be: | a | b | c | | (:A) | (:B) | (:C) | +nodes +relationships +labels +properties
  • 23. Calculating side effects  org.neo4j.graphdb.QueryStatistics
  • 24. Side effects for properties Scenario: Non-existent values in a property map are removed with SET = Given any graph And having executed: """ CREATE (:X {foo: 'A', bar: 'B'}) """ When executing query: """ MATCH (n:X {foo: 'A'}) SET n = {foo: 'B', baz: 'C'} RETURN n """ Then the result should be: | n | | (:X {foo: 'B', baz: 'C'}) | And the side effects should be: | +properties | 2 | | -properties | 1 | :X foo: 'B' baz: 'C' :X foo: 'A' bar: 'B' openCypher/issues/221
  • 25. Side effects with Cypher queries MATCH (n) RETURN n MATCH ()-[r]->() RETURN r ±nodes ±relationships Idea: an openCypher-compatible engine should support standard Cypher, so use queries to determine side effects
  • 26. Side effects with Cypher queries MATCH (n) UNWIND labels(n) AS label RETURN DISTINCT label ±labels MATCH (n) UNWIND keys(n) AS key RETURN key -property MATCH (n) UNWIND keys(n) AS key WITH properties(n) AS properties RETURN key, properties[key] AS value +property
  • 27. Properties considering nodes and relationships MATCH (n) UNWIND keys(n) AS key RETURN key UNION ALL MATCH ()-[r]->() UNWIND keys(r) AS key RETURN key MATCH (n) UNWIND keys(n) AS key WITH properties(n) AS properties, key RETURN key, properties[key] AS value UNION ALL MATCH ()-[r]->() UNWIND keys(r) AS key WITH properties(r) AS properties, key RETURN key, properties[key] AS value -property +property 𝑘𝑖−1 ∖ 𝑘𝑖 𝑘𝑣𝑖 ∖ 𝑘𝑣𝑖−1
  • 28. Unobservable behaviour CREATE (n) DELETE n RETURN id(n) MATCH (n) SET n.x = 1 WITH n SET n.x = NULL Created 1 node, deleted 1 node, started streaming 1 record after 17 ms and completed after 18 ms. Set 2 properties, statement completed in 1 ms.
  • 29. License considerations  Nep4j Embedded: GPLv3  Neo4j Driver: ASLv2  openCypher: ASLv2  ingraph: EPLv1
  • 30. License considerations  Nep4j Embedded: GPLv3  Neo4j Driver: ASLv2  openCypher: ASLv2  ingraph: EPLv1
  • 31. TCK to relational algebra  Gábor Szárnyas, József Marton: Formalisation of openCypher Queries in Relational Algebra (Extended Version)
  • 32. TCK to relational algebra  Gábor Szárnyas, József Marton: Formalisation of openCypher Queries in Relational Algebra (Extended Version) only testing compilation
  • 33. Summary  Complex toolchain for testing o Cucumber & Gradle plug-in o Feature parser o Test database  Points to discuss o What is the precise semantics of changes? o Check for all behaviour or only observable changes? o What license to use? o Insert +types? o Potential CIRs?
  • 34. Related resources  Repository: github.com/bme-db-lab/opencypher-tck-tests  Cucumber test reports: bme-db-lab.github.io/opencypher-tck-tests/feature-overview.html  Technical report: docs.inf.mit.bme.hu/ingraph/pub/opencypher-report.pdf  Discussion on observability: github.com/opencypher/openCypher/issues/221  Using ImpermanentGraphDatabase from Gradle: github.com/neo4j/neo4j/issues/8796  GraphAware testing framework: github.com/graphaware/neo4j-framework/tree/master/tests