org.openrdf.query.algebra.Join.getLeftArg()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(86)

本文整理了Java中org.openrdf.query.algebra.Join.getLeftArg()方法的一些代码示例,展示了Join.getLeftArg()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Join.getLeftArg()方法的具体详情如下:
包路径:org.openrdf.query.algebra.Join
类名称:Join
方法名:getLeftArg

Join.getLeftArg介绍

暂无

代码示例

代码示例来源:origin: org.apache.rya/rya.sail

public ParallelJoinIterator(EvaluationStrategy strategy, Join join, BindingSet bindings, ExecutorService executorService, int batch)
    throws QueryEvaluationException {
  this.strategy = strategy;
  this.join = join;
  leftIter = strategy.evaluate(join.getLeftArg(), bindings);
  this.executorService = executorService;
  this.batch = batch;
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-evaluation

public HashJoinIteration(EvaluationStrategy strategy, Join join, BindingSet bindings)
  throws QueryEvaluationException
{
  this(strategy, join.getLeftArg(), join.getRightArg(), bindings, false);
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-model

public Set<String> getBindingNames() {
  Set<String> bindingNames = new LinkedHashSet<String>(16);
  bindingNames.addAll(getLeftArg().getBindingNames());
  bindingNames.addAll(getRightArg().getBindingNames());
  return bindingNames;
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-model

public Set<String> getAssuredBindingNames() {
  Set<String> bindingNames = new LinkedHashSet<String>(16);
  bindingNames.addAll(getLeftArg().getAssuredBindingNames());
  bindingNames.addAll(getRightArg().getAssuredBindingNames());
  return bindingNames;
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-evaluation

public JoinIterator(EvaluationStrategy strategy, Join join, BindingSet bindings)
  throws QueryEvaluationException
{
  this.strategy = strategy;
  this.join = join;
  leftIter = strategy.evaluate(join.getLeftArg(), bindings);
  // Initialize with empty iteration so that var is never null
  rightIter = new EmptyIteration<BindingSet, QueryEvaluationException>();
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryrender

public void meet(Join theJoin)
  throws Exception
{
  binaryOpMeet(theJoin, theJoin.getLeftArg(), theJoin.getRightArg());
}

代码示例来源:origin: org.openrdf.alibaba/alibaba-sail-federation

@Override
public void meet(Join node)
{
  double cost = 1;
  for (TupleExpr arg : new TupleExpr[] { node.getLeftArg(),
      node.getRightArg() }) {
    arg.visit(this);
    cost *= this.cardinality;
  }
  cardinality = cost;
}

代码示例来源:origin: org.openrdf.sesame/sesame-sail-federation

@Override
public void meet(Join node) {
  double cost = 1;
  for (TupleExpr arg : new TupleExpr[] { node.getLeftArg(), // NOPMD
      node.getRightArg() })
  {
    arg.visit(this);
    cost *= this.cardinality;
  }
  cardinality = cost;
}

代码示例来源:origin: org.apache.rya/rya.sail

protected <L extends List<TupleExpr>> L getJoinArgs(TupleExpr tupleExpr, L joinArgs) {
  if (tupleExpr instanceof Join) {
    Join join = (Join) tupleExpr;
    getJoinArgs(join.getLeftArg(), joinArgs);
    getJoinArgs(join.getRightArg(), joinArgs);
  } else {
    joinArgs.add(tupleExpr);
  }
  return joinArgs;
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-evaluation

protected <L extends List<TupleExpr>> L getJoinArgs(TupleExpr tupleExpr, L joinArgs) {
  if (tupleExpr instanceof Join) {
    Join join = (Join)tupleExpr;
    getJoinArgs(join.getLeftArg(), joinArgs);
    getJoinArgs(join.getRightArg(), joinArgs);
  }
  else {
    joinArgs.add(tupleExpr);
  }
  return joinArgs;
}

代码示例来源:origin: org.openrdf.sesame/sesame-sail-federation

@Override
public CloseableIteration<BindingSet, QueryEvaluationException> evaluate(Join join, BindingSet bindings)
  throws QueryEvaluationException
{
  CloseableIteration<BindingSet, QueryEvaluationException> result = evaluate(join.getLeftArg(), bindings);
  for (int i = 1, n = 2; i < n; i++) {
    result = new ParallelJoinCursor(this, result, join.getRightArg()); // NOPMD
    executor.execute((Runnable)result);
  }
  return result;
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-evaluation

public BottomUpJoinIterator(EvaluationStrategy strategy, Join join, BindingSet bindings)
  throws QueryEvaluationException
{
  leftIter = strategy.evaluate(join.getLeftArg(), bindings);
  rightIter = strategy.evaluate(join.getRightArg(), bindings);
  joinAttributes = join.getLeftArg().getBindingNames();
  joinAttributes.retainAll(join.getRightArg().getBindingNames());
  hashTable = null;
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryrender

/**
 * @inheritDoc
 */
@Override
public void meet(Join theJoin)
  throws Exception
{
  theJoin.getLeftArg().visit(this);
  theJoin.getRightArg().visit(this);
}

代码示例来源:origin: org.apache.rya/rya.indexing

@Override
public void meet(final Join join) {
  if (join.getRightArg().getBindingNames().containsAll(filterVars)) {
    // All required vars are bound by the left expr
    join.getRightArg().visit(this);
  } else if (join.getLeftArg().getBindingNames()
      .containsAll(filterVars)) {
    // All required vars are bound by the right expr
    join.getLeftArg().visit(this);
  } else {
    relocate(filter, join);
  }
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-evaluation

@Override
public void meet(Join join) {
  if (join.getLeftArg().getBindingNames().containsAll(filterVars)) {
    // All required vars are bound by the left expr
    join.getLeftArg().visit(this);
  }
  else if (join.getRightArg().getBindingNames().containsAll(filterVars)) {
    // All required vars are bound by the right expr
    join.getRightArg().visit(this);
  }
  else {
    relocate(filter, join);
  }
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryalgebra-evaluation

@Override
public void meet(Join node) {
  node.getLeftArg().visit(this);
  double leftArgCost = this.cardinality;
  node.getRightArg().visit(this);
  cardinality *= leftArgCost;
}

代码示例来源:origin: org.apache.rya/rya.indexing

@Override
  public void meet(final Join node) {
    final QueryModelNode lNode = node.getLeftArg();
    if (lNode instanceof StatementPattern) {
      exchangeVar.replaceWith(lNode);
      node.setLeftArg(exchangeVar);
    } else {
      super.meet(node);
    }
  }
}

代码示例来源:origin: org.apache.rya/rya.pcj.fluo.app

@Override
public void meet(final Join node) {
  // Extract the metadata that will be stored from the node.
  final String joinNodeId = nodeIds.getOrMakeId(node);
  final QueryModelNode left = node.getLeftArg();
  final QueryModelNode right = node.getRightArg();
  // Update the metadata for the JoinMetadata.Builder.
  makeJoinMetadata(joinNodeId, JoinType.NATURAL_JOIN, left, right);
  // Walk to the next node.
  super.meet(node);
}

代码示例来源:origin: org.openrdf.sesame/sesame-queryrender

/**
 * @inheritDoc
 */
@Override
public void meet(Join theJoin)
  throws Exception
{
  ctxOpen(theJoin);
  theJoin.getLeftArg().visit(this);
  theJoin.getRightArg().visit(this);
  ctxClose(theJoin);
}

代码示例来源:origin: org.openrdf.sesame/sesame-sail-federation

@Override
public void meet(Join join) {
  super.meet(join);
  TupleExpr leftArg = join.getLeftArg();
  TupleExpr rightArg = join.getRightArg();
  if (leftArg instanceof EmptySet || rightArg instanceof EmptySet) {
    join.replaceWith(new EmptySet());
  }
  else if (leftArg instanceof SingletonSet) {
    join.replaceWith(rightArg);
  }
  else if (rightArg instanceof SingletonSet) {
    join.replaceWith(leftArg);
  }
}

相关文章