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


Java Convention.NONE属性代码示例

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


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

示例1: matches

@Override
public boolean matches(RelOptRuleCall call) {
  Project topProject = call.rel(0);
  Project bottomProject = call.rel(1);

  // Make sure both projects be LogicalProject.
  if (topProject.getTraitSet().getTrait(ConventionTraitDef.INSTANCE) != Convention.NONE ||
      bottomProject.getTraitSet().getTrait(ConventionTraitDef.INSTANCE) != Convention.NONE) {
    return false;
  }

  // We have a complex output type do not fire the merge project rule
  if (checkComplexOutput(topProject) || checkComplexOutput(bottomProject)) {
    return false;
  }

  return true;
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:18,代码来源:DrillMergeProjectRule.java

示例2: onMatch

public void onMatch(RelOptRuleCall call) {
  LogicalProject rel = call.rel(0);
  RelNode rawInput = call.rel(1);
  RelNode input = convert(rawInput, PHYSICAL);

  if (subsetHack && input instanceof RelSubset) {
    RelSubset subset = (RelSubset) input;
    for (RelNode child : subset.getRels()) {
      // skip logical nodes
      if (child.getTraitSet().getTrait(ConventionTraitDef.INSTANCE)
          == Convention.NONE) {
        continue;
      } else {
        RelTraitSet outcome = child.getTraitSet().replace(PHYSICAL);
        call.transformTo(
            new PhysProj(rel.getCluster(), outcome, convert(child, outcome),
                rel.getChildExps(), rel.getRowType()));
      }
    }
  } else {
    call.transformTo(
        PhysProj.create(input, rel.getChildExps(), rel.getRowType()));
  }

}
 
开发者ID:apache,项目名称:calcite,代码行数:25,代码来源:TraitPropagationTest.java

示例3: injectImportanceBoost

/**
 * Finds RelSubsets in the plan that contain only rels of
 * {@link Convention#NONE} and boosts their importance by 25%.
 */
private void injectImportanceBoost() {
  final Set<RelSubset> requireBoost = new HashSet<>();

SUBSET_LOOP:
  for (RelSubset subset : ruleQueue.subsetImportances.keySet()) {
    for (RelNode rel : subset.getRels()) {
      if (rel.getConvention() != Convention.NONE) {
        continue SUBSET_LOOP;
      }
    }

    requireBoost.add(subset);
  }

  ruleQueue.boostImportance(requireBoost, 1.25);
}
 
开发者ID:apache,项目名称:calcite,代码行数:20,代码来源:VolcanoPlanner.java

示例4: read

@Override
public T read(final Kryo kryo, final Input input, final Class<T> type) {
  final boolean isNone = kryo.readObject(input, Boolean.class);
  if (isNone) {
    return (T)Convention.NONE;
  }
  final T result = super.read(kryo, input, type);
  final T normalized = (T) result.getTraitDef().canonize(result);
  kryo.reference(normalized);
  return normalized;
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:11,代码来源:RelTraitSerializers.java

示例5: matches

@Override
public boolean matches(RelOptRuleCall call) {
  Project topProject = call.rel(0);
  Project bottomProject = call.rel(1);

  if (topProject.getConvention() != Convention.NONE || bottomProject.getConvention() != Convention.NONE) {
    return false;
  }

  return true;
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:11,代码来源:MergeProjectRule.java

示例6: matches

@Override
public boolean matches(RelOptRuleCall call) {
  OldScanCrel logicalScan = call.rel(0);
  // Plugins can be null for certain group scans (I believe Direct Group Scan is one of them)
  return logicalScan.getGroupScan().getStoragePluginConvention() == null
      || logicalScan.getGroupScan().getStoragePluginConvention() == Convention.NONE;
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:7,代码来源:OldScanRelRule.java

示例7: getStoragePluginConvention

@Override
public Convention getStoragePluginConvention() {
  // Since people seem to not like null, adding Convention.NONE, although it really should be null.
  // Not all storage plugins bring in their own conventions, so it should not be tied to a convention.
  // So for now, we will use Convention.NONE as it does not bring its own convention.
  return Convention.NONE;
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:7,代码来源:AbstractStoragePlugin.java

示例8: JdbcTableModificationRule

private JdbcTableModificationRule(JdbcConvention out) {
    super(
            LogicalTableModify.class,
            Convention.NONE,
            out,
            "JdbcTableModificationRule");
}
 
开发者ID:bitnine-oss,项目名称:octopus,代码行数:7,代码来源:JdbcRules.java

示例9: CassandraConverterRule

<R extends RelNode> CassandraConverterRule(Class<R> clazz,
    Predicate<? super R> predicate,
    String description) {
  super(clazz, predicate, Convention.NONE,
      CassandraRel.CONVENTION, RelFactories.LOGICAL_BUILDER, description);
  this.out = CassandraRel.CONVENTION;
}
 
开发者ID:apache,项目名称:calcite,代码行数:7,代码来源:CassandraRules.java

示例10: EnumerableJoinRule

EnumerableJoinRule() {
  super(
      LogicalJoin.class,
      Convention.NONE,
      EnumerableConvention.INSTANCE,
      "EnumerableJoinRule");
}
 
开发者ID:apache,项目名称:calcite,代码行数:7,代码来源:EnumerableJoinRule.java

示例11: DrillJdbcProjectRule

public DrillJdbcProjectRule(JdbcConvention out) {
  super(LogicalProject.class, Convention.NONE, out, "JdbcProjectRule");
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:3,代码来源:DrillJdbcRuleBase.java

示例12: DrillJdbcFilterRule

public DrillJdbcFilterRule(JdbcConvention out) {
  super(LogicalFilter.class, Convention.NONE, out, "DrillJdbcFilterRule");
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:3,代码来源:DrillJdbcRuleBase.java

示例13: SourceLogicalConverter

public SourceLogicalConverter(StoragePluginType pluginType) {
  super(ScanCrel.class, Convention.NONE, Rel.LOGICAL, pluginType.generateRuleName("LogicalScanConverter"));
  this.pluginType = pluginType;
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:4,代码来源:SourceLogicalConverter.java

示例14: BeamSortRule

private BeamSortRule() {
  super(LogicalSort.class, Convention.NONE,
      BeamLogicalConvention.INSTANCE, "BeamSortRule");
}
 
开发者ID:apache,项目名称:beam,代码行数:4,代码来源:BeamSortRule.java

示例15: BeamValuesRule

private BeamValuesRule() {
  super(LogicalValues.class, Convention.NONE,
      BeamLogicalConvention.INSTANCE, "BeamValuesRule");
}
 
开发者ID:apache,项目名称:beam,代码行数:4,代码来源:BeamValuesRule.java


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