-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* GH-1405 fixed scope handling in join iterator use merge-join for group patterns to handle scope, with special case exception for FILTER (NOT) EXISTS * GH-1405 only add scoping braces if arg is a group graph pattern * GH-1405 fix NosuchElementException in MergeIteration and skip for all filters
- Loading branch information
1 parent
c6baf63
commit 91cb1cd
Showing
8 changed files
with
264 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...ation/src/main/java/org/eclipse/rdf4j/query/algebra/evaluation/iterator/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@Deprecated | ||
@InternalUseOnly | ||
/** | ||
* Implementations of {@link Iteration} relevant to query evaluation. | ||
* | ||
* @deprecated since 3.0. This feature is for internal use only: its existence, signature or behavior may change without | ||
* warning from one release to the next. | ||
*/ | ||
package org.eclipse.rdf4j.query.algebra.evaluation.iterator; | ||
|
||
import org.eclipse.rdf4j.common.annotation.InternalUseOnly; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
...ryalgebra/model/src/test/java/org/eclipse/rdf4j/query/algebra/helpers/TupleExprsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2019 Eclipse RDF4J contributors. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Distribution License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/org/documents/edl-v10.php. | ||
*******************************************************************************/ | ||
package org.eclipse.rdf4j.query.algebra.helpers; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
import static org.eclipse.rdf4j.query.algebra.helpers.TupleExprs.isFilterExistsFunction; | ||
|
||
import org.eclipse.rdf4j.model.ValueFactory; | ||
import org.eclipse.rdf4j.model.impl.SimpleValueFactory; | ||
import org.eclipse.rdf4j.query.algebra.Compare; | ||
import org.eclipse.rdf4j.query.algebra.Exists; | ||
import org.eclipse.rdf4j.query.algebra.Filter; | ||
import org.eclipse.rdf4j.query.algebra.Not; | ||
import org.eclipse.rdf4j.query.algebra.StatementPattern; | ||
import org.eclipse.rdf4j.query.algebra.TupleExpr; | ||
import org.eclipse.rdf4j.query.algebra.Var; | ||
import org.junit.Test; | ||
|
||
public class TupleExprsTest { | ||
|
||
private final ValueFactory f = SimpleValueFactory.getInstance(); | ||
|
||
@Test | ||
public void isFilterExistsFunctionOnEmptyFilter() { | ||
TupleExpr expr = new Filter(); | ||
|
||
assertThat(isFilterExistsFunction(expr)).isFalse(); | ||
} | ||
|
||
@Test | ||
public void isFilterExistsFunctionOnNormalFilter() { | ||
Filter expr = new Filter(); | ||
expr.setArg(new StatementPattern()); | ||
expr.setCondition(new Compare(new Var("x", f.createBNode()), new Var("y", f.createBNode()))); | ||
|
||
assertThat(isFilterExistsFunction(expr)).isFalse(); | ||
} | ||
|
||
@Test | ||
public void isFilterExistsFunctionOnNormalNot() { | ||
Filter expr = new Filter(); | ||
expr.setArg(new StatementPattern()); | ||
expr.setCondition(new Not(new Compare(new Var("x", f.createBNode()), new Var("y", f.createBNode())))); | ||
|
||
assertThat(isFilterExistsFunction(expr)).isFalse(); | ||
} | ||
|
||
@Test | ||
public void isFilterExistsFunctionOnExists() { | ||
Filter expr = new Filter(); | ||
expr.setArg(new StatementPattern()); | ||
expr.setCondition(new Exists(new StatementPattern())); | ||
|
||
assertThat(isFilterExistsFunction(expr)).isTrue(); | ||
|
||
} | ||
|
||
@Test | ||
public void isFilterExistsFunctionOnNotExist() { | ||
Filter expr = new Filter(); | ||
expr.setArg(new StatementPattern()); | ||
expr.setCondition(new Not(new Exists(new StatementPattern()))); | ||
|
||
assertThat(isFilterExistsFunction(expr)).isTrue(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.