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

[drqYtb6r] apoc.cypher.run* procedures don't return results (extended) #3624

Merged
merged 1 commit into from
Jun 16, 2023

Conversation

vga91
Copy link
Collaborator

@vga91 vga91 commented Jun 16, 2023

  • fixed apoc.cypher.parallel and apoc.cypher.runFile(s)
  • renamed CypherExtendedTest to CypherEnterpriseExtendedTest
  • added tests for all apoc.cypher.* procedure to check other potential similar cases.

@vga91 vga91 added 5.9 cherry-picked This PR has been cherry-picked to the other active branches extended-functionality labels Jun 16, 2023
@vga91 vga91 force-pushed the 5.9-apoc-cypher-run-with-return-extended branch from 460e4df to 5373354 Compare June 16, 2023 12:07
@vga91 vga91 removed the cherry-picked This PR has been cherry-picked to the other active branches label Jun 16, 2023
@vga91 vga91 changed the title apoc.cypher.run* procedures don't return results (extended) [drqYtb6r] apoc.cypher.run* procedures don't return results (extended) Jun 16, 2023
@vga91 vga91 force-pushed the 5.9-apoc-cypher-run-with-return-extended branch 4 times, most recently from ee5791d to 9e8be28 Compare June 16, 2023 13:42
@vga91 vga91 force-pushed the 5.9-apoc-cypher-run-with-return-extended branch from 9e8be28 to 3c20805 Compare June 16, 2023 14:02
@@ -385,7 +387,7 @@ public Stream<MapResult> parallel2(@Name("fragment") String fragment, @Name("par
}
return futures.stream().flatMap(f -> {
try {
return f.get().stream().map(MapResult::new);
return EntityUtil.anyRebind(tx, f.get()).stream().map(MapResult::new);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this?

Copy link
Collaborator Author

@vga91 vga91 Jun 16, 2023

Choose a reason for hiding this comment

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

We need to do the entity rebind of the result f.get() (which can be a Map.of("key", <ENTITY>) )
in order to avoid the error The transaction has been closed.,
e.g. with the testCypherParallel2WithResults case.

@conker84
Copy link
Collaborator

@vga91 do we need to rebind also other methods like mapParallel?

@vga91
Copy link
Collaborator Author

vga91 commented Jun 16, 2023

@vga91 do we need to rebind also other methods like mapParallel?

The other procedures work also without rebind.

I created tests similar to parallel2 and runFile cases to make sure (see e.g. testCypherMapParallelWithResults).

@conker84 conker84 merged commit 3d8827d into 5.9 Jun 16, 2023
@conker84 conker84 deleted the 5.9-apoc-cypher-run-with-return-extended branch June 16, 2023 14:45
vga91 added a commit that referenced this pull request Jun 19, 2023
* [drqYtb6r] apoc.cypher.run* procedures don't return results (neo4j/apoc#431)

* [drqYtb6r] apoc.cypher.run* procedures don't return results

* [drqYtb6r] fixed docker tests

* [drqYtb6r] added test with other apoc.cpyher.run* procedures

* [drqYtb6r] apoc.cypher.run* procedures don't return results (extended) (#3624)
vga91 added a commit that referenced this pull request Jul 24, 2023
#3624) (#3676)

* [drqYtb6r] apoc.cypher.run* procedures don't return results (extended) (#3624)

* [drqYtb6r] changed importFolder with the correct one provided by TestContainerUtil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants