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

GH-1574 better target node support #2020

Merged
merged 5 commits into from
Mar 20, 2020

Conversation

hmottestad
Copy link
Contributor

GitHub issue resolved: #1574

Briefly describe the changes proposed in this PR:

  • validates all sh:targetNodes, regardless of if the targets exist or not
  • fixes som logging issues

@abrokenjester abrokenjester changed the title Issues/1574 better target node support GH-1574 better target node support Mar 19, 2020
@hmottestad hmottestad force-pushed the issues/1574_better_target_node_support branch from 4ecfb43 to 2750f53 Compare March 19, 2020 10:01
Signed-off-by: Håvard Ottestad <hmottestad@gmail.com>
Signed-off-by: Håvard Ottestad <hmottestad@gmail.com>
…idationExecutionLogging is enabled as well as a fix where the wrong identity hash is used when printing plans

Signed-off-by: Håvard Ottestad <hmottestad@gmail.com>
Signed-off-by: Håvard Ottestad <hmottestad@gmail.com>
@hmottestad hmottestad force-pushed the issues/1574_better_target_node_support branch from 2750f53 to 0168b23 Compare March 19, 2020 10:06
@abrokenjester
Copy link
Contributor

@hmottestad, could I ask you to use the revised branch naming conventions for future branches? Especially once we move back to merge commits this will be convenient, as it makes the merge commit's message easier to read.

Copy link
Contributor

@abrokenjester abrokenjester left a comment

Choose a reason for hiding this comment

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

Generally looks good, in sofar as I can judge. Couple of minor remarks and questions inline.

@@ -0,0 +1,185 @@
/*******************************************************************************
* Copyright (c) 2018 Eclipse RDF4J contributors.
Copy link
Contributor

Choose a reason for hiding this comment

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

wrong year.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just a renamed file.

@@ -74,7 +75,8 @@ private void calculateNext() {

}

List<Value> line = Arrays.asList(subject, SimpleValueFactory.getInstance().createLiteral(count));
List<Value> line = new ArrayList<>(
Arrays.asList(subject, SimpleValueFactory.getInstance().createLiteral(count)));
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are you wrapping this in an Arraylist?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Arrays.asList is immutable and I need mutability.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added some comments.

@@ -39,7 +39,7 @@ public Tuple(List<Value> list) {
}

public Tuple(Value... list) {
line = Arrays.asList(list);
line = new ArrayList<>(Arrays.asList(list));
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here - why is this needed? It looks redundant.


String expected = Arrays.toString(tuples.toArray());

assertEquals(expected, actual);
Copy link
Contributor

Choose a reason for hiding this comment

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

While these tests (after reading back and forth a bit) seem sensible, I'm a bit lost on what this has to do with issue GH-1574. Did the fix you added change ordering behavior somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ordering test is a renamed file where I’ve moved in some old tests and also added one that checks that the set used to store the target nodes is sorted. Which is an assumption used further down the line.

Signed-off-by: Håvard Ottestad <hmottestad@gmail.com>
@hmottestad hmottestad merged commit b4ee8b3 into master Mar 20, 2020
@hmottestad hmottestad deleted the issues/1574_better_target_node_support branch March 20, 2020 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SHACL - support sh:targetNode better
2 participants