org.apache.calcite.rel.core.Join.getCondition()方法的使用及代码示例

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

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

Join.getCondition介绍

暂无

代码示例

代码示例来源:origin: apache/hive

public static JoinPredicateInfo constructJoinPredicateInfo(Join j) throws CalciteSemanticException {
 return constructJoinPredicateInfo(j, j.getCondition());
}

代码示例来源:origin: apache/drill

public static JoinPredicateInfo constructJoinPredicateInfo(Join j) throws CalciteSemanticException {
 return constructJoinPredicateInfo(j, j.getCondition());
}

代码示例来源:origin: apache/hive

/**
 *
 * @param j
 * @param additionalPredicate
 * @return if predicate is the join condition return (true, joinCond)
 * else return (false, minusPred)
 */
private Pair<Boolean,RexNode> getCombinedPredicateForJoin(Join j, RexNode additionalPredicate) {
 RexNode minusPred = RelMdUtil.minusPreds(j.getCluster().getRexBuilder(), additionalPredicate,
   j.getCondition());
 if (minusPred != null) {
  List<RexNode> minusList = new ArrayList<RexNode>();
  minusList.add(j.getCondition());
  minusList.add(minusPred);
  return new Pair<Boolean,RexNode>(false, minusPred);
 }
 return new Pair<Boolean,RexNode>(true,j.getCondition());
}

代码示例来源:origin: apache/drill

/**
 *
 * @param j
 * @param additionalPredicate
 * @return if predicate is the join condition return (true, joinCond)
 * else return (false, minusPred)
 */
private Pair<Boolean,RexNode> getCombinedPredicateForJoin(Join j, RexNode additionalPredicate) {
 RexNode minusPred = RelMdUtil.minusPreds(j.getCluster().getRexBuilder(), additionalPredicate,
   j.getCondition());
 if (minusPred != null) {
  List<RexNode> minusList = new ArrayList<RexNode>();
  minusList.add(j.getCondition());
  minusList.add(minusPred);
  return new Pair<Boolean,RexNode>(false, minusPred);
 }
 return new Pair<Boolean,RexNode>(true,j.getCondition());
}

代码示例来源:origin: apache/hive

@Override
public boolean matches(RelOptRuleCall call) {
 Join join = call.rel(0);
 List<RexNode> joinConds = RelOptUtil.conjunctions(join.getCondition());
 for (RexNode joinCnd : joinConds) {
  if (!HiveCalciteUtil.isDeterministic(joinCnd)) {
   return false;
  }
 }
 return true;
}

代码示例来源:origin: apache/drill

@Override
public boolean matches(RelOptRuleCall call) {
 Join join = call.rel(0);
 List<RexNode> joinConds = RelOptUtil.conjunctions(join.getCondition());
 for (RexNode joinCnd : joinConds) {
  if (!HiveCalciteUtil.isDeterministic(joinCnd)) {
   return false;
  }
 }
 return true;
}

代码示例来源:origin: apache/hive

@Override
public boolean matches(RelOptRuleCall call) {
 final Join join = call.rel(0);
 final HiveJdbcConverter conv1 = call.rel(1);
 final HiveJdbcConverter conv2 = call.rel(2);
 if (!conv1.getJdbcDialect().equals(conv2.getJdbcDialect())) {
  return false;
 }
 return JDBCAbstractSplitFilterRule.canSplitFilter(join.getCondition(), conv1.getJdbcDialect());
}

代码示例来源:origin: apache/hive

rightFrame.r, decorrelateExpr(rel.getCondition()), rel.getJoinType());

代码示例来源:origin: apache/hive

@Override
public boolean matches(RelOptRuleCall call) {
 Filter filter = call.rel(0);
 Join   join = call.rel(1);
 HiveJdbcConverter   conv1 = call.rel(2);
 HiveJdbcConverter   conv2 = call.rel(3);
 if (!conv1.getJdbcDialect().equals(conv2.getJdbcDialect())) {
  return false;
 }
 boolean visitorRes = JDBCRexCallValidator.isValidJdbcOperation(filter.getCondition(), conv1.getJdbcDialect());
 if (visitorRes) {
  return JDBCRexCallValidator.isValidJdbcOperation(join.getCondition(), conv1.getJdbcDialect());
 }
 return false;
}

代码示例来源:origin: apache/hive

new PushProjector(
    origProj,
    join.getCondition(),
    join,
    preserveExprCondition,
if (join.getCondition() != null) {
 List<RelDataTypeField> projJoinFieldList = new ArrayList<>();
 projJoinFieldList.addAll(
 newJoinFilter =
   pushProject.convertRefsAndExprs(
     join.getCondition(),
     projJoinFieldList,
     adjustments);

代码示例来源:origin: apache/hive

List<RexNode> exprs =
  RelOptUtil.conjunctions(
    compose(rexBuilder, ImmutableList.of(joinRel.getCondition())));

代码示例来源:origin: apache/hive

@Override
 public void onMatch(RelOptRuleCall call) {
  final Join join = call.rel(0);
  final RexBuilder rexBuilder = join.getCluster().getRexBuilder();
  final RexNode condition = RexUtil.pullFactors(rexBuilder, join.getCondition());
  RexNode newCondition = analyzeRexNode(rexBuilder, condition);
  // If we could not transform anything, we bail out
  if (newCondition.toString().equals(condition.toString())) {
   return;
  }
  RelNode newNode = join.copy(join.getTraitSet(),
    newCondition,
    join.getLeft(),
    join.getRight(),
    join.getJoinType(),
    join.isSemiJoinDone());
  call.transformTo(newNode);
 }
}

代码示例来源:origin: apache/hive

@Override public void onMatch(RelOptRuleCall call) {
  final Join topJoin= call.rel(0);
  final Join join = call.rel(2);
  final Aggregate aggregate = call.rel(6);

  // in presence of grouping sets we can't remove sq_count_check
  if(aggregate.indicator) {
   return;
  }
  if(isAggregateWithoutGbyKeys(aggregate) || isAggWithConstantGbyKeys(aggregate, call)) {
   // join(left, join.getRight)
   RelNode newJoin = HiveJoin.getJoin(topJoin.getCluster(), join.getLeft(),  topJoin.getRight(),
     topJoin.getCondition(), topJoin.getJoinType());
   call.transformTo(newJoin);
  }
 }
}

代码示例来源:origin: apache/hive

if (join.getCondition().isAlwaysTrue()) {
 return;
Join newJoin = join.copy(join.getTraitSet(), join.getCondition(),
    lChild, rChild, join.getJoinType(), join.isSemiJoinDone());
call.getPlanner().onCopy(join, newJoin);

代码示例来源:origin: apache/hive

RexNode newJoinCond = join.getCondition().accept(new RelOptUtil.RexInputConverter(rexBuilder, joinFields,
                                         joinFields, condAdjustments));
Join swappedJoin = (Join)builder.push(join.getRight()).push(join.getLeft()).join(join.getJoinType(),

代码示例来源:origin: apache/hive

RelNode newRel = join.copy(join.getTraitSet(), join.getCondition(),
  lChild, rChild, join.getJoinType(), join.isSemiJoinDone());
call.getPlanner().onCopy(join, newRel);

代码示例来源:origin: apache/drill

final MutableRel right = toMutable(join.getRight());
return MutableJoin.of(join.getCluster(), left, right,
  join.getCondition(), join.getJoinType(), join.getVariablesSet());

代码示例来源:origin: apache/drill

RelNode newRel = join.copy(join.getTraitSet(), join.getCondition(),
  lChild, rChild, join.getJoinType(), join.isSemiJoinDone());
call.getPlanner().onCopy(join, newRel);

代码示例来源:origin: apache/drill

QueryBlockInfo right = convertSource(join.getRight());
s = new Schema(left.schema, right.schema);
ASTNode cond = join.getCondition().accept(new RexVisitor(s));
boolean semiJoin = join instanceof SemiJoin;
if (join.getRight() instanceof Join && !semiJoin) {

代码示例来源:origin: apache/hive

QueryBlockInfo right = convertSource(join.getRight());
s = new Schema(left.schema, right.schema);
ASTNode cond = join.getCondition().accept(new RexVisitor(s, false, r.getCluster().getRexBuilder()));
boolean semiJoin = join instanceof SemiJoin;
if (join.getRight() instanceof Join && !semiJoin) {

相关文章