本文整理汇总了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;
}
示例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()));
}
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例8: JdbcTableModificationRule
private JdbcTableModificationRule(JdbcConvention out) {
super(
LogicalTableModify.class,
Convention.NONE,
out,
"JdbcTableModificationRule");
}
示例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;
}
示例10: EnumerableJoinRule
EnumerableJoinRule() {
super(
LogicalJoin.class,
Convention.NONE,
EnumerableConvention.INSTANCE,
"EnumerableJoinRule");
}
示例11: DrillJdbcProjectRule
public DrillJdbcProjectRule(JdbcConvention out) {
super(LogicalProject.class, Convention.NONE, out, "JdbcProjectRule");
}
示例12: DrillJdbcFilterRule
public DrillJdbcFilterRule(JdbcConvention out) {
super(LogicalFilter.class, Convention.NONE, out, "DrillJdbcFilterRule");
}
示例13: SourceLogicalConverter
public SourceLogicalConverter(StoragePluginType pluginType) {
super(ScanCrel.class, Convention.NONE, Rel.LOGICAL, pluginType.generateRuleName("LogicalScanConverter"));
this.pluginType = pluginType;
}
示例14: BeamSortRule
private BeamSortRule() {
super(LogicalSort.class, Convention.NONE,
BeamLogicalConvention.INSTANCE, "BeamSortRule");
}
示例15: BeamValuesRule
private BeamValuesRule() {
super(LogicalValues.class, Convention.NONE,
BeamLogicalConvention.INSTANCE, "BeamValuesRule");
}