当前位置: 首页>>代码示例>>Java>>正文


Java LogicalFilter.getInput方法代码示例

本文整理汇总了Java中org.apache.calcite.rel.logical.LogicalFilter.getInput方法的典型用法代码示例。如果您正苦于以下问题:Java LogicalFilter.getInput方法的具体用法?Java LogicalFilter.getInput怎么用?Java LogicalFilter.getInput使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.calcite.rel.logical.LogicalFilter的用法示例。


在下文中一共展示了LogicalFilter.getInput方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onMatch

import org.apache.calcite.rel.logical.LogicalFilter; //导入方法依赖的package包/类
@Override
public void onMatch(RelOptRuleCall call) {
  final LogicalFilter filter = (LogicalFilter) call.rel(0);
  final RelNode input = filter.getInput();
  //final RelTraitSet traits = filter.getTraitSet().plus(DrillRel.DRILL_LOGICAL);
  final RelNode convertedInput = convert(input, input.getTraitSet().plus(DrillRel.DRILL_LOGICAL));
  call.transformTo(new DrillFilterRel(filter.getCluster(), convertedInput.getTraitSet(), convertedInput, filter.getCondition()));
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:9,代码来源:DrillFilterRule.java

示例2: onMatch

import org.apache.calcite.rel.logical.LogicalFilter; //导入方法依赖的package包/类
@Override
public void onMatch(RelOptRuleCall call) {
  final LogicalFilter filter = (LogicalFilter) call.rel(0);
  final RelNode input = filter.getInput();
  //final RelTraitSet traits = filter.getTraitSet().plus(Rel.LOGICAL);
  final RelNode convertedInput = convert(input, input.getTraitSet().plus(Rel.LOGICAL).simplify());
  call.transformTo(new FilterRel(filter.getCluster(), convertedInput.getTraitSet(), convertedInput, filter.getCondition()));
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:9,代码来源:FilterRule.java

示例3: decorrelateRel

import org.apache.calcite.rel.logical.LogicalFilter; //导入方法依赖的package包/类
/**
 * Rewrite LogicalFilter.
 *
 * @param rel the filter rel to rewrite
 */
public Frame decorrelateRel(LogicalFilter rel) {
	//
	// Rewrite logic:
	//
	// 1. If a LogicalFilter references a correlated field in its filter
	// condition, rewrite the LogicalFilter to be
	//   LogicalFilter
	//     LogicalJoin(cross product)
	//       OriginalFilterInput
	//       ValueGenerator(produces distinct sets of correlated variables)
	// and rewrite the correlated fieldAccess in the filter condition to
	// reference the LogicalJoin output.
	//
	// 2. If LogicalFilter does not reference correlated variables, simply
	// rewrite the filter condition using new input.
	//

	final RelNode oldInput = rel.getInput();
	Frame frame = getInvoke(oldInput, rel);
	if (frame == null) {
		// If input has not been rewritten, do not rewrite this rel.
		return null;
	}

	// If this LogicalFilter has correlated reference, create value generator
	// and produce the correlated variables in the new output.
	if (cm.mapRefRelToCorVar.containsKey(rel)) {
		decorrelateInputWithValueGenerator(rel);

		// The old input should be mapped to the newly created LogicalJoin by
		// rewriteInputWithValueGenerator().
		frame = map.get(oldInput);
	}

	// Replace the filter expression to reference output of the join
	// Map filter to the new filter over join
	RelNode newFilter = RelOptUtil.createFilter(frame.r, decorrelateExpr(rel.getCondition()));

	// Filter does not change the input ordering.
	// Filter rel does not permute the input.
	// All corvars produced by filter will have the same output positions in the
	// input rel.
	return register(rel, newFilter, frame.oldToNewOutputPos, frame.corVarOutputPos);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:50,代码来源:FlinkRelDecorrelator.java

示例4: decorrelateRel

import org.apache.calcite.rel.logical.LogicalFilter; //导入方法依赖的package包/类
/**
 * Rewrite LogicalFilter.
 *
 * @param rel the filter rel to rewrite
 */
public Frame decorrelateRel(LogicalFilter rel) {
  //
  // Rewrite logic:
  //
  // 1. If a Filter references a correlated field in its filter
  // condition, rewrite the Filter to be
  //   Filter
  //     Join(cross product)
  //       originalFilterInput
  //       ValueGenerator(produces distinct sets of correlated variables)
  // and rewrite the correlated fieldAccess in the filter condition to
  // reference the Join output.
  //
  // 2. If Filter does not reference correlated variables, simply
  // rewrite the filter condition using new input.
  //

  final RelNode oldInput = rel.getInput();
  Frame frame = getInvoke(oldInput, rel);
  if (frame == null) {
    // If input has not been rewritten, do not rewrite this rel.
    return null;
  }

  // If this Filter has correlated reference, create value generator
  // and produce the correlated variables in the new output.
  if (false) {
    if (cm.mapRefRelToCorRef.containsKey(rel)) {
      frame = decorrelateInputWithValueGenerator(rel, frame);
    }
  } else {
    frame = maybeAddValueGenerator(rel, frame);
  }

  final CorelMap cm2 = new CorelMapBuilder().build(rel);

  // Replace the filter expression to reference output of the join
  // Map filter to the new filter over join
  relBuilder.push(frame.r)
      .filter(decorrelateExpr(currentRel, map, cm2, rel.getCondition()));

  // Filter does not change the input ordering.
  // Filter rel does not permute the input.
  // All corVars produced by filter will have the same output positions in the
  // input rel.
  return register(rel, relBuilder.build(), frame.oldToNewOutputs,
      frame.corDefOutputs);
}
 
开发者ID:apache,项目名称:calcite,代码行数:54,代码来源:RelDecorrelator.java


注:本文中的org.apache.calcite.rel.logical.LogicalFilter.getInput方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。