Skip to content

Commit

Permalink
GH-5130 disable ZeroOrMorePath and OneOrMorePath for the time being
Browse files Browse the repository at this point in the history
  • Loading branch information
hmottestad committed Nov 21, 2024
1 parent dbc9b50 commit 8ced4d5
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ public static List<IRI> getSupportedShaclPredicates() {
SHACL.TARGET_PROP,
SHACL.INVERSE_PATH,
SHACL.ALTERNATIVE_PATH,
SHACL.ONE_OR_MORE_PATH,
SHACL.ZERO_OR_MORE_PATH,
// SHACL.ONE_OR_MORE_PATH,
// SHACL.ZERO_OR_MORE_PATH,
SHACL.NODE,
SHACL.QUALIFIED_MAX_COUNT,
SHACL.QUALIFIED_MIN_COUNT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public PlanNode getAnyAdded(ConnectionsGroup connectionsGroup, Resource[] dataGr

@Override
public boolean isSupported() {
return true;
return false;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public PlanNode getAnyAdded(ConnectionsGroup connectionsGroup, Resource[] dataGr

@Override
public boolean isSupported() {
return true;
return false;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public DatatypeFilter(PlanNode parent, IRI datatype, ConnectionsGroup connection
super(parent, connectionsGroup);
this.datatype = datatype;
this.xsdDatatype = CoreDatatype.from(datatype).asXSDDatatype().orElse(null);
// stackTrace = Thread.currentThread().getStackTrace();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public DebugPlanNode(PlanNode parent, String message, Consumer<ValidationTuple>
public DebugPlanNode(PlanNode parent, String message) {
this.parent = parent;
this.message = message;
// this.stackTrace = Thread.currentThread().getStackTrace();
this.stackTrace = Thread.currentThread().getStackTrace();

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@
import org.apache.commons.text.StringEscapeUtils;
import org.eclipse.rdf4j.common.iteration.CloseableIteration;
import org.eclipse.rdf4j.sail.shacl.wrapper.data.ConnectionsGroup;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class EqualsJoinValue implements PlanNode {

static private final Logger logger = LoggerFactory.getLogger(EqualsJoinValue.class);

private final PlanNode left;
private final PlanNode right;
private final boolean useAsFilter;
Expand All @@ -29,8 +34,9 @@ public EqualsJoinValue(PlanNode left, PlanNode right, boolean useAsFilter, Conne
this.right = PlanNodeHelper.handleSorting(this, right, connectionsGroup);

this.useAsFilter = useAsFilter;
// this.stackTrace = Thread.currentThread().getStackTrace();

if (logger.isDebugEnabled()) {
this.stackTrace = Thread.currentThread().getStackTrace();
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import org.eclipse.rdf4j.sail.SailException;
import org.eclipse.rdf4j.sail.memory.MemoryStoreConnection;
import org.eclipse.rdf4j.sail.shacl.wrapper.data.ConnectionsGroup;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
Expand All @@ -35,6 +37,8 @@
*/
public class FilterByPredicateObject implements PlanNode {

static private final Logger logger = LoggerFactory.getLogger(FilterByPredicateObject.class);

private final SailConnection connection;
private final boolean includeInferred;
private final Set<Resource> filterOnObject;
Expand All @@ -54,6 +58,7 @@ public class FilterByPredicateObject implements PlanNode {
public FilterByPredicateObject(SailConnection connection, Resource[] dataGraph, IRI filterOnPredicate,
Set<Resource> filterOnObject, PlanNode parent, boolean returnMatching, FilterOn filterOn,
boolean includeInferred, ConnectionsGroup connectionsGroup) {

this.dataGraph = dataGraph;
this.parent = PlanNodeHelper.handleSorting(this, parent, connectionsGroup);
this.connection = connection;
Expand All @@ -75,7 +80,9 @@ public FilterByPredicateObject(SailConnection connection, Resource[] dataGraph,
&& RDF.TYPE.equals(filterOnPredicate)) {
typeFilterWithInference = true;
}
// this.stackTrace = Thread.currentThread().getStackTrace();
if (logger.isDebugEnabled()) {
this.stackTrace = Thread.currentThread().getStackTrace();
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ public abstract class FilterPlanNode implements MultiStreamPlanNode, PlanNode {
private CloseableIteration<ValidationTuple> iterator;
private ValidationExecutionLogger validationExecutionLogger;
private boolean closed;
StackTraceElement[] stackTrace;

abstract boolean checkTuple(Reference t);

public FilterPlanNode(PlanNode parent, ConnectionsGroup connectionsGroup) {
this.parent = PlanNodeHelper.handleSorting(this, parent, connectionsGroup);
// this.stackTrace = Thread.currentThread().getStackTrace();
}

public PlanNode getTrueNode(Class<? extends PushablePlanNode> type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@
import org.apache.commons.text.StringEscapeUtils;
import org.eclipse.rdf4j.common.iteration.CloseableIteration;
import org.eclipse.rdf4j.sail.shacl.wrapper.data.ConnectionsGroup;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author Håvard Ottestad
*/
public class ShiftToNodeShape implements PlanNode {
static private final Logger logger = LoggerFactory.getLogger(ShiftToNodeShape.class);

private StackTraceElement[] stackTrace;
PlanNode parent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@
import org.apache.commons.text.StringEscapeUtils;
import org.eclipse.rdf4j.common.iteration.CloseableIteration;
import org.eclipse.rdf4j.sail.shacl.wrapper.data.ConnectionsGroup;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author Håvard Ottestad
*/
public class ShiftToPropertyShape implements PlanNode {
static private final Logger logger = LoggerFactory.getLogger(ShiftToPropertyShape.class);

private StackTraceElement[] stackTrace;
PlanNode parent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ abstract public class AbstractShaclTest {

private static final Set<String> ignoredTestCases = Set.of(
"test-cases/path/oneOrMorePath",
"test-cases/nodeKind/oneOrMorePathComplex",
"test-cases/nodeKind/zeroOrMorePathComplex",
"test-cases/nodeKind/oneOrMorePathSimple",
"test-cases/minCount/oneOrMorePath",
"test-cases/path/zeroOrMorePath",
"test-cases/minCount/zeroOrMorePath",
"test-cases/path/zeroOrOnePath"

);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public class W3cComplianceTest {
private final static Set<String> TESTS_FAILING_DUE_TO_MISSING_FEATURES_FROM_THE_SPEC = Set.of(
"/core/node/xone-001.ttl",
"/core/node/xone-duplicate.ttl",
"/core/path/path-complex-001.ttl",
"/core/path/path-oneOrMore-001.ttl",
"/core/path/path-zeroOrMore-001.ttl",
"/core/path/path-zeroOrOne-001.ttl",
"/core/property/qualifiedMinCountDisjoint-001.ttl",
"/core/property/qualifiedValueShapesDisjoint-001.ttl",
Expand Down

0 comments on commit 8ced4d5

Please sign in to comment.