-
Notifications
You must be signed in to change notification settings - Fork 20
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
🐛 fix for h-omer#8 #13
Conversation
…ading of large data sets, bug fixes
Hi! And thanks for your contribution! May I ask you if you could also provide some tests for what you've implemented? Thanks! |
sure, I will work on those next week, thanks! |
Thank you so much! |
test added, please let me know if you want additional testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good implementation. Still a few changes and I think it can be merged.
if (listA.size() != listB.size()) { | ||
System.out.println("Lists must have same size" + listA); | ||
} else { | ||
for (int index = 0; index < listA.size(); index++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return IntStream.range(0, listaA.size())
.mapToObj(i -> Pair.of(listA.get(i), listB.get(i))
.collect(Collectors.toList());
@@ -222,7 +221,20 @@ public static LocalDateTime convertEpochToLocalDateTime(Long epochDateTime) { | |||
return Instant.ofEpochMilli(epochDateTime).atZone(ZoneId.systemDefault()).toLocalDateTime(); | |||
} | |||
|
|||
public static Boolean isSystemType(String type) { | |||
public static <A, B> List<org.apache.commons.lang3.tuple.Pair<A, B>> zip(List<A> listA, List<B> listB) { | |||
List<Pair<A, B>> pairList = new LinkedList<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove in favor of following comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please see latest commit
isEntityOrThrowException(entitySource); | ||
|
||
return entityDestinations.size() == relProps.size() ? sourceCurrentState.map(node -> zip(entityDestinations, relProps).stream().map((item) -> { | ||
final Node destinationNode = item.getLeft(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to move this inlined function into a more speaking method of the same class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please see latest commit
Optional<Node> sourceCurrentState = createNewSourceState(entitySource, defaultToNow(date)); | ||
isEntityOrThrowException(entitySource); | ||
|
||
return entityDestinations.size() == relProps.size() ? sourceCurrentState.map(node -> zip(entityDestinations, relProps).stream().map((item) -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to use explicit "if" condition? It is more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please see latest commit
✨ multiple relationship delete
Hi @tschn , can you please explain the new procedure you've added for multiple relationship delete? |
@tschn is there any chance you're going to explain your changes? we would like to integrate those, but it would be nice to hear something from you! |
please see latest commit for updated documentation, the plural procedures were added to allow updating more than one relationship for a given state for 'batch' style updates to the graph |
check to see if relationship end node matches before deleting