Skip to content

Commit 49b1538

Browse files
committed
memory management
1 parent c010e4b commit 49b1538

17 files changed

Lines changed: 11152 additions & 1851 deletions

File tree

core/queryalgebra/evaluation/src/main/java/org/eclipse/rdf4j/query/algebra/evaluation/optimizer/QueryJoinOptimizer.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ private Deque<TupleExpr> reorderJoinArgs(Deque<TupleExpr> orderedJoinArgs) {
411411
}
412412

413413
private TupleExpr selectBestStartingExpr(List<TupleExpr> tupleExprs,
414-
BiFunction<TupleExpr, TupleExpr, Double> getCard) {
414+
BiFunction<TupleExpr, TupleExpr, Double> getCard) {
415415
List<TupleExpr> candidates = new ArrayList<>();
416416
for (TupleExpr tupleExpr : tupleExprs) {
417417
if (statementPatternWithMinimumOneConstant(tupleExpr)) {
@@ -734,7 +734,7 @@ private TupleExpr getNextSubselect(List<TupleExpr> currentList, List<TupleExpr>
734734
* bound in other tuple expressions over variables with a fixed value.
735735
*/
736736
protected TupleExpr selectNextTupleExpr(List<TupleExpr> expressions, Map<TupleExpr, Double> cardinalityMap,
737-
Map<TupleExpr, List<Var>> varsMap, Map<Var, Integer> varFreqMap) {
737+
Map<TupleExpr, List<Var>> varsMap, Map<Var, Integer> varFreqMap) {
738738
if (expressions.size() == 1) {
739739
TupleExpr tupleExpr = expressions.get(0);
740740
if (tupleExpr.getCostEstimate() < 0) {
@@ -767,7 +767,7 @@ protected TupleExpr selectNextTupleExpr(List<TupleExpr> expressions, Map<TupleEx
767767
}
768768

769769
protected double getTupleExprCost(TupleExpr tupleExpr, Map<TupleExpr, Double> cardinalityMap,
770-
Map<TupleExpr, List<Var>> varsMap, Map<Var, Integer> varFreqMap) {
770+
Map<TupleExpr, List<Var>> varsMap, Map<Var, Integer> varFreqMap) {
771771

772772
// BindingSetAssignment has a typical constant cost. This cost is not based on statistics so is much more
773773
// reliable. If the BindingSetAssignment binds to any of the other variables in the other tuple expressions
@@ -895,7 +895,7 @@ protected int getForeignVarFreq(List<Var> ownUnboundVars, Map<Var, Integer> varF
895895
}
896896

897897
private void mergeJoinForCrossJoin(Deque<TupleExpr> orderedJoinArgs, Set<Var> supportedOrders, TupleExpr left,
898-
TupleExpr right, Join join) {
898+
TupleExpr right, Join join) {
899899
if (!orderedJoinArgs.isEmpty()
900900
&& !supportedOrders.isEmpty() && !joinOnMultipleVars(left, right)
901901
&& !joinSizeIsTooDifferent(left.getResultSizeEstimate(), right.getResultSizeEstimate())
@@ -972,11 +972,11 @@ private static boolean statementPatternWithMinimumOneConstant(TupleExpr cand) {
972972
return cand instanceof StatementPattern && ((((StatementPattern) cand).getSubjectVar() != null
973973
&& ((StatementPattern) cand).getSubjectVar().hasValue())
974974
|| (((StatementPattern) cand).getPredicateVar() != null
975-
&& ((StatementPattern) cand).getPredicateVar().hasValue())
975+
&& ((StatementPattern) cand).getPredicateVar().hasValue())
976976
|| (((StatementPattern) cand).getObjectVar() != null
977-
&& ((StatementPattern) cand).getObjectVar().hasValue())
977+
&& ((StatementPattern) cand).getObjectVar().hasValue())
978978
|| (((StatementPattern) cand).getContextVar() != null
979-
&& ((StatementPattern) cand).getContextVar().hasValue()));
979+
&& ((StatementPattern) cand).getContextVar().hasValue()));
980980
}
981981

982982
private static int getUnionSize(Set<String> currentListNames, Set<String> candidateBindingNames) {
@@ -1008,7 +1008,7 @@ private static final class EmptyTripleSource implements TripleSource {
10081008

10091009
@Override
10101010
public CloseableIteration<? extends Statement> getStatements(Resource subj, IRI pred, Value obj,
1011-
Resource... contexts) throws QueryEvaluationException {
1011+
Resource... contexts) throws QueryEvaluationException {
10121012
return TripleSource.EMPTY_ITERATION;
10131013
}
10141014

0 commit comments

Comments
 (0)