Skip to content

Commit e93a375

Browse files
committed
fixes after merging
1 parent 8494e8e commit e93a375

3 files changed

Lines changed: 31 additions & 18 deletions

File tree

core/queryalgebra/evaluation/src/main/java/org/eclipse/rdf4j/query/algebra/evaluation/iterator/PathIteration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ public void meet(Var var) {
616616
QueryModelNode parent = var.getParentNode();
617617
parent.replaceChildNode(var, replacement.clone());
618618
} else if (replaceAnons && var.isAnonymous() && !var.hasValue()) {
619-
String varName = "anon-replace-" + var.getName() + index;
619+
String varName = "anon_replace_" + var.getName() + index;
620620
Var replacementVar = createAnonVar(varName, null, true);
621621
QueryModelNode parent = var.getParentNode();
622622
parent.replaceChildNode(var, replacementVar);

core/queryalgebra/evaluation/src/main/java/org/eclipse/rdf4j/query/algebra/evaluation/iterator/ZeroLengthPathIteration.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ public class ZeroLengthPathIteration extends LookAheadIteration<BindingSet> {
3838

3939
private static final Literal SUBJECT = SimpleValueFactory.getInstance().createLiteral("subject");
4040

41-
public static final String ANON_SUBJECT_VAR = "zero-length-internal-start";
41+
public static final String ANON_SUBJECT_VAR = "zero_length_internal_start";
4242

43-
public static final String ANON_PREDICATE_VAR = "zero-length-internal-pred";
43+
public static final String ANON_PREDICATE_VAR = "zero_length_internal_pred";
4444

45-
public static final String ANON_OBJECT_VAR = "zero-length-internal-end";
45+
public static final String ANON_OBJECT_VAR = "zero_length_internal_end";
4646

47-
public static final String ANON_SEQUENCE_VAR = "zero-length-internal-seq";
47+
public static final String ANON_SEQUENCE_VAR = "zero_length_internal_seq";
4848

4949
private QueryBindingSet result;
5050

tools/federation/src/main/java/org/eclipse/rdf4j/federated/evaluation/iterator/FedXPathIteration.java

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
package org.eclipse.rdf4j.federated.evaluation.iterator;
2-
3-
/**
4-
* ****************************************************************************
5-
* Copyright (c) 2015 Eclipse RDF4J contributors, Aduna, and others.
1+
/*******************************************************************************
2+
* Copyright (c) 2024 Eclipse RDF4J contributors.
63
*
7-
* All rights reserved. This program and the accompanying materials
8-
* are made available under the terms of the Eclipse Distribution License v1.0
9-
* which accompanies this distribution, and is available at
10-
* http://www.eclipse.org/org/documents/edl-v10.php.
4+
* All rights reserved. This program and the accompanying materials
5+
* are made available under the terms of the Eclipse Distribution License v1.0
6+
* which accompanies this distribution, and is available at
7+
* http://www.eclipse.org/org/documents/edl-v10.php.
118
*
12-
* SPDX-License-Identifier: BSD-3-Clause
13-
* *****************************************************************************
14-
*/
9+
* SPDX-License-Identifier: BSD-3-Clause
10+
******************************************************************************/
11+
12+
package org.eclipse.rdf4j.federated.evaluation.iterator;
13+
1514
import java.util.ArrayList;
1615
import java.util.HashSet;
1716
import java.util.Iterator;
@@ -39,15 +38,29 @@
3938
import org.eclipse.rdf4j.query.algebra.StatementPattern.Scope;
4039
import org.eclipse.rdf4j.query.algebra.TupleExpr;
4140
import org.eclipse.rdf4j.query.algebra.Var;
42-
import org.eclipse.rdf4j.query.algebra.ZeroLengthPath;
4341
import org.eclipse.rdf4j.query.algebra.evaluation.EvaluationStrategy;
4442
import org.eclipse.rdf4j.query.algebra.evaluation.QueryBindingSet;
4543
import org.eclipse.rdf4j.query.algebra.evaluation.iterator.PathIteration;
4644
import org.eclipse.rdf4j.query.algebra.helpers.AbstractQueryModelVisitor;
4745
import org.eclipse.rdf4j.query.impl.SimpleBinding;
4846

47+
/**
48+
* A iteration to evaluate property path expressions.
49+
*
50+
* @see PathIteration
51+
*/
4952
public class FedXPathIteration extends LookAheadIteration<BindingSet> {
5053

54+
/*
55+
* IMPL NOTE:
56+
*
57+
* This is technically almost a 1:1 copy of org.eclipse.rdf4j.query.algebra.evaluation.iterator.PathIteration.
58+
* Reusing or extending PathIteration requires refactoring in its constructor initialization.
59+
*
60+
* The main difference is in keeping track of QueryInfo and creating a FedXZeroLengthPath in #createIteration for
61+
* zero length path expressions.
62+
*/
63+
5164
// Should never be seen by code outside of this iterator
5265
private static final String END = "$end_from_path_iteration";
5366
private static final String START = "$start_from_path_iteration";

0 commit comments

Comments
 (0)