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

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

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

Join.getSystemFieldList介绍

[英]Returns a list of system fields that will be prefixed to output row type.
[中]返回将作为输出行类型前缀的系统字段列表。

代码示例

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

public static JoinPredicateInfo constructJoinPredicateInfo(Join j, RexNode predicate) throws CalciteSemanticException {
 return constructJoinPredicateInfo(j.getInputs(), j.getSystemFieldList(), predicate);
}

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

public static JoinPredicateInfo constructJoinPredicateInfo(Join j, RexNode predicate) throws CalciteSemanticException {
 return constructJoinPredicateInfo(j.getInputs(), j.getSystemFieldList(), predicate);
}

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

int nSysFields = joinRel.getSystemFieldList().size();
ImmutableBitSet rightFieldsBitSet = ImmutableBitSet.range(nSysFields + nFieldsLeft,
  nSysFields + nFieldsLeft + nFieldsRight);

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

int nSysFields = joinRel.getSystemFieldList().size();
ImmutableBitSet rightFieldsBitSet = ImmutableBitSet.range(nSysFields + nFieldsLeft,
  nSysFields + nFieldsLeft + nFieldsRight);

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

nFieldsLeft = joinRel.getLeft().getRowType().getFieldList().size();
nFieldsRight = joinRel.getRight().getRowType().getFieldList().size();
nSysFields = joinRel.getSystemFieldList().size();
leftFieldsBitSet = ImmutableBitSet.range(nSysFields,
  nSysFields + nFieldsLeft);

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

int nSysFields = join.getSystemFieldList().size();
ImmutableBitSet rightFieldsBitSet = ImmutableBitSet.range(nSysFields + nFieldsLeft,
  nSysFields + nFieldsLeft + nFieldsRight);

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

nFieldsLeft = joinRel.getLeft().getRowType().getFieldList().size();
nFieldsRight = joinRel.getRight().getRowType().getFieldList().size();
nSysFields = joinRel.getSystemFieldList().size();
leftFieldsBitSet = ImmutableBitSet.range(nSysFields,
  nSysFields + nFieldsLeft);

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

List<RelDataTypeField> projJoinFieldList = new ArrayList<>();
projJoinFieldList.addAll(
  join.getSystemFieldList());
projJoinFieldList.addAll(
  leftProjRel.getRowType().getFieldList());

代码示例来源:origin: Qihoo360/Quicksql

@Override public RelWriter explainTerms(RelWriter pw) {
 return super.explainTerms(pw)
   .item("condition", condition)
   .item("joinType", joinType.lowerName)
   .itemIf(
     "systemFields",
     getSystemFieldList(),
     !getSystemFieldList().isEmpty());
}

代码示例来源:origin: org.apache.calcite/calcite-core

@Override public RelWriter explainTerms(RelWriter pw) {
 return super.explainTerms(pw)
   .item("condition", condition)
   .item("joinType", joinType.lowerName)
   .itemIf(
     "systemFields",
     getSystemFieldList(),
     !getSystemFieldList().isEmpty());
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

public static JoinPredicateInfo constructJoinPredicateInfo(Join j, RexNode predicate) {
 return constructJoinPredicateInfo(j.getInputs(), j.getSystemFieldList(), predicate);
}

代码示例来源:origin: Qihoo360/Quicksql

@Override protected RelDataType deriveRowType() {
 return SqlValidatorUtil.deriveJoinRowType(left.getRowType(),
   right.getRowType(), joinType, getCluster().getTypeFactory(), null,
   getSystemFieldList());
}

代码示例来源:origin: org.apache.calcite/calcite-core

@Override protected RelDataType deriveRowType() {
 return SqlValidatorUtil.deriveJoinRowType(left.getRowType(),
   right.getRowType(), joinType, getCluster().getTypeFactory(), null,
   getSystemFieldList());
}

代码示例来源:origin: org.apache.calcite/calcite-core

public void onMatch(RelOptRuleCall call) {
  final Delta delta = call.rel(0);
  Util.discard(delta);
  final Join join = call.rel(1);
  final RelNode left = join.getLeft();
  final RelNode right = join.getRight();
  final LogicalDelta rightWithDelta = LogicalDelta.create(right);
  final LogicalJoin joinL = LogicalJoin.create(left, rightWithDelta,
    join.getCondition(), join.getVariablesSet(), join.getJoinType(),
    join.isSemiJoinDone(),
    ImmutableList.copyOf(join.getSystemFieldList()));
  final LogicalDelta leftWithDelta = LogicalDelta.create(left);
  final LogicalJoin joinR = LogicalJoin.create(leftWithDelta, right,
    join.getCondition(), join.getVariablesSet(), join.getJoinType(),
    join.isSemiJoinDone(),
    ImmutableList.copyOf(join.getSystemFieldList()));
  List<RelNode> inputsToUnion = new ArrayList<>();
  inputsToUnion.add(joinL);
  inputsToUnion.add(joinR);
  final LogicalUnion newNode = LogicalUnion.create(inputsToUnion, true);
  call.transformTo(newNode);
 }
}

代码示例来源:origin: Qihoo360/Quicksql

public void onMatch(RelOptRuleCall call) {
  final Delta delta = call.rel(0);
  Util.discard(delta);
  final Join join = call.rel(1);
  final RelNode left = join.getLeft();
  final RelNode right = join.getRight();
  final LogicalDelta rightWithDelta = LogicalDelta.create(right);
  final LogicalJoin joinL = LogicalJoin.create(left, rightWithDelta,
    join.getCondition(), join.getVariablesSet(), join.getJoinType(),
    join.isSemiJoinDone(),
    ImmutableList.copyOf(join.getSystemFieldList()));
  final LogicalDelta leftWithDelta = LogicalDelta.create(left);
  final LogicalJoin joinR = LogicalJoin.create(leftWithDelta, right,
    join.getCondition(), join.getVariablesSet(), join.getJoinType(),
    join.isSemiJoinDone(),
    ImmutableList.copyOf(join.getSystemFieldList()));
  List<RelNode> inputsToUnion = new ArrayList<>();
  inputsToUnion.add(joinL);
  inputsToUnion.add(joinR);
  final LogicalUnion newNode = LogicalUnion.create(inputsToUnion, true);
  call.transformTo(newNode);
 }
}

代码示例来源:origin: org.apache.calcite/calcite-core

public void onMatch(final RelOptRuleCall call) {
 Join join = call.rel(0);
 if (!join.getSystemFieldList().isEmpty()) {
  // FIXME Enable this rule for joins with system fields
  return;
 }
 final RelNode swapped = swap(join, this.swapOuter, call.builder());
 if (swapped == null) {
  return;
 }
 // The result is either a Project or, if the project is trivial, a
 // raw Join.
 final Join newJoin =
   swapped instanceof Join
     ? (Join) swapped
     : (Join) swapped.getInput(0);
 call.transformTo(swapped);
 // We have converted join='a join b' into swapped='select
 // a0,a1,a2,b0,b1 from b join a'. Now register that project='select
 // b0,b1,a0,a1,a2 from (select a0,a1,a2,b0,b1 from b join a)' is the
 // same as 'b join a'. If we didn't do this, the swap join rule
 // would fire on the new join, ad infinitum.
 final RelBuilder relBuilder = call.builder();
 final List<RexNode> exps =
   RelOptUtil.createSwappedJoinExprs(newJoin, join, false);
 relBuilder.push(swapped)
   .project(exps, newJoin.getRowType().getFieldNames());
 call.getPlanner().ensureRegistered(relBuilder.build(), newJoin);
}

代码示例来源:origin: Qihoo360/Quicksql

public void onMatch(final RelOptRuleCall call) {
 Join join = call.rel(0);
 if (!join.getSystemFieldList().isEmpty()) {
  // FIXME Enable this rule for joins with system fields
  return;
 }
 final RelNode swapped = swap(join, this.swapOuter, call.builder());
 if (swapped == null) {
  return;
 }
 // The result is either a Project or, if the project is trivial, a
 // raw Join.
 final Join newJoin =
   swapped instanceof Join
     ? (Join) swapped
     : (Join) swapped.getInput(0);
 call.transformTo(swapped);
 // We have converted join='a join b' into swapped='select
 // a0,a1,a2,b0,b1 from b join a'. Now register that project='select
 // b0,b1,a0,a1,a2 from (select a0,a1,a2,b0,b1 from b join a)' is the
 // same as 'b join a'. If we didn't do this, the swap join rule
 // would fire on the new join, ad infinitum.
 final RelBuilder relBuilder = call.builder();
 final List<RexNode> exps =
   RelOptUtil.createSwappedJoinExprs(newJoin, join, false);
 relBuilder.push(swapped)
   .project(exps, newJoin.getRowType().getFieldNames());
 call.getPlanner().ensureRegistered(relBuilder.build(), newJoin);
}

代码示例来源:origin: Qihoo360/Quicksql

if (!join.getSystemFieldList().isEmpty()) {

代码示例来源:origin: org.apache.calcite/calcite-core

if (!join.getSystemFieldList().isEmpty()) {

代码示例来源:origin: org.apache.calcite/calcite-core

!= getSystemFieldList().size()
+ left.getRowType().getFieldCount()
+ (this instanceof SemiJoin ? 0 : right.getRowType().getFieldCount())) {
 new RexChecker(
   getCluster().getTypeFactory().builder()
     .addAll(getSystemFieldList())
     .addAll(getLeft().getRowType().getFieldList())
     .addAll(getRight().getRowType().getFieldList())

相关文章