Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1064: Add procedure to compare graphs #3041

Merged
merged 4 commits into from
Dec 12, 2022

Conversation

vga91
Copy link
Collaborator

@vga91 vga91 commented Jul 8, 2022

Fixes #1064

Cherry pick of: 1064

Differences from cherry-picked pr:

  • added class DiffFull because Bolt located in full in 4.x.

  • in BoltConnection.java (located in Bolt.java in the cherry-picked pr), changed toMap(Session session.. , toCollection(Session session... etc to toMap(Transaction tx.. , toCollection(Transaction tx...

  • added systemUpdates in Neo4jContainerExtension

@vga91 vga91 force-pushed the cherry-picks-4.4-from-3.5 branch from 7d18375 to 16804b9 Compare July 8, 2022 12:28
@vga91 vga91 added the cherry-picked This PR has been cherry-picked to the other active branches label Jul 8, 2022
@@ -77,7 +81,7 @@ public Stream<RowResult> loadFromLocal(String localStatement, String remoteState
String withColumns = "WITH " + localResult.columns().stream()
.map(c -> "$" + c + " AS " + c)
.collect(Collectors.joining(", ")) + "\n";
Map<Long, Object> nodesCache = new HashMap<>();
Map<Long, VirtualNode> nodesCache = new HashMap<>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use Node here?

@jexp
Copy link
Member

jexp commented Jul 8, 2022

Does this still support diffing two node-sets in the same graph?

And it would be good if there was a way from the Java API to diff to a second multi-db database. But I'm not sure how easily this is possible.

@vga91
Copy link
Collaborator Author

vga91 commented Aug 25, 2022

Does this still support diffing two node-sets in the same graph?

And it would be good if there was a way from the Java API to diff to a second multi-db database. But I'm not sure how easily this is possible.

Yes, we can compare 2 set in the same db, I added a test shouldFindDifferencesInTheSameDb for this.

And now I added the possibility to compare 2 graph using bolt protocol (via boltConfig param),
and via type: "DATABASE" (using DatabaseManagementService) instead of "URL".

Also, I added some other tests and docs and var. small code improvements.

@conker84 conker84 merged commit 77e72a4 into neo4j-contrib:4.4 Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-picked This PR has been cherry-picked to the other active branches extended-functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add procedure to compare graphs
3 participants