本文整理匯總了Java中org.apache.calcite.rel.metadata.RelMdDistribution類的典型用法代碼示例。如果您正苦於以下問題:Java RelMdDistribution類的具體用法?Java RelMdDistribution怎麽用?Java RelMdDistribution使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
RelMdDistribution類屬於org.apache.calcite.rel.metadata包,在下文中一共展示了RelMdDistribution類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: DefaultRelMetadataProvider
import org.apache.calcite.rel.metadata.RelMdDistribution; //導入依賴的package包/類
private DefaultRelMetadataProvider() {
super(ImmutableList.of(
RelMdRowCount.SOURCE,
RelMdDistinctRowCount.SOURCE,
RelMdPercentageOriginalRows.SOURCE,
RelMdColumnOrigins.SOURCE,
RelMdMaxRowCount.SOURCE,
RelMdUniqueKeys.SOURCE,
RelMdColumnUniqueness.SOURCE,
RelMdPopulationSize.SOURCE,
RelMdSize.SOURCE,
RelMdParallelism.SOURCE,
RelMdDistribution.SOURCE,
RelMdMemory.SOURCE,
RelMdSelectivity.SOURCE,
RelMdExplainVisibility.SOURCE,
RelMdPredicates.SOURCE,
RelMdCollation.SOURCE));
}
示例2: create
import org.apache.calcite.rel.metadata.RelMdDistribution; //導入依賴的package包/類
public static LogicalCalc create(final RelNode input,
final RexProgram program) {
final RelOptCluster cluster = input.getCluster();
final RelMetadataQuery mq = cluster.getMetadataQuery();
final RelTraitSet traitSet = cluster.traitSet()
.replace(Convention.NONE)
.replaceIfs(RelCollationTraitDef.INSTANCE,
new Supplier<List<RelCollation>>() {
public List<RelCollation> get() {
return RelMdCollation.calc(mq, input, program);
}
})
.replaceIf(RelDistributionTraitDef.INSTANCE,
new Supplier<RelDistribution>() {
public RelDistribution get() {
return RelMdDistribution.calc(mq, input, program);
}
});
return new LogicalCalc(cluster, traitSet, input, program);
}
示例3: create
import org.apache.calcite.rel.metadata.RelMdDistribution; //導入依賴的package包/類
/** Creates a LogicalFilter. */
public static LogicalFilter create(final RelNode input, RexNode condition,
ImmutableSet<CorrelationId> variablesSet) {
final RelOptCluster cluster = input.getCluster();
final RelMetadataQuery mq = cluster.getMetadataQuery();
final RelTraitSet traitSet = cluster.traitSetOf(Convention.NONE)
.replaceIfs(RelCollationTraitDef.INSTANCE,
new Supplier<List<RelCollation>>() {
public List<RelCollation> get() {
return RelMdCollation.filter(mq, input);
}
})
.replaceIf(RelDistributionTraitDef.INSTANCE,
new Supplier<RelDistribution>() {
public RelDistribution get() {
return RelMdDistribution.filter(mq, input);
}
});
return new LogicalFilter(cluster, traitSet, input, condition, variablesSet);
}
示例4: create
import org.apache.calcite.rel.metadata.RelMdDistribution; //導入依賴的package包/類
/** Creates an EnumerableValues. */
public static EnumerableValues create(RelOptCluster cluster,
final RelDataType rowType,
final ImmutableList<ImmutableList<RexLiteral>> tuples) {
final RelMetadataQuery mq = cluster.getMetadataQuery();
final RelTraitSet traitSet =
cluster.traitSetOf(EnumerableConvention.INSTANCE)
.replaceIfs(RelCollationTraitDef.INSTANCE,
new Supplier<List<RelCollation>>() {
public List<RelCollation> get() {
return RelMdCollation.values(mq, rowType, tuples);
}
})
.replaceIf(RelDistributionTraitDef.INSTANCE,
new Supplier<RelDistribution>() {
public RelDistribution get() {
return RelMdDistribution.values(rowType, tuples);
}
});
return new EnumerableValues(cluster, rowType, tuples, traitSet);
}
示例5: create
import org.apache.calcite.rel.metadata.RelMdDistribution; //導入依賴的package包/類
/** Creates an EnumerableLimit. */
public static EnumerableLimit create(final RelNode input, RexNode offset,
RexNode fetch) {
final RelOptCluster cluster = input.getCluster();
final RelMetadataQuery mq = cluster.getMetadataQuery();
final RelTraitSet traitSet =
cluster.traitSetOf(EnumerableConvention.INSTANCE)
.replaceIfs(
RelCollationTraitDef.INSTANCE,
new Supplier<List<RelCollation>>() {
public List<RelCollation> get() {
return RelMdCollation.limit(mq, input);
}
})
.replaceIf(RelDistributionTraitDef.INSTANCE,
new Supplier<RelDistribution>() {
public RelDistribution get() {
return RelMdDistribution.limit(mq, input);
}
});
return new EnumerableLimit(cluster, traitSet, input, offset, fetch);
}
示例6: create
import org.apache.calcite.rel.metadata.RelMdDistribution; //導入依賴的package包/類
/** Creates an EnumerableFilter. */
public static EnumerableFilter create(final RelNode input,
RexNode condition) {
final RelOptCluster cluster = input.getCluster();
final RelMetadataQuery mq = cluster.getMetadataQuery();
final RelTraitSet traitSet =
cluster.traitSetOf(EnumerableConvention.INSTANCE)
.replaceIfs(
RelCollationTraitDef.INSTANCE,
new Supplier<List<RelCollation>>() {
public List<RelCollation> get() {
return RelMdCollation.filter(mq, input);
}
})
.replaceIf(RelDistributionTraitDef.INSTANCE,
new Supplier<RelDistribution>() {
public RelDistribution get() {
return RelMdDistribution.filter(mq, input);
}
});
return new EnumerableFilter(cluster, traitSet, input, condition);
}
示例7: create
import org.apache.calcite.rel.metadata.RelMdDistribution; //導入依賴的package包/類
/** Creates an EnumerableCalc. */
public static EnumerableCalc create(final RelNode input,
final RexProgram program) {
final RelOptCluster cluster = input.getCluster();
final RelMetadataQuery mq = cluster.getMetadataQuery();
final RelTraitSet traitSet = cluster.traitSet()
.replace(EnumerableConvention.INSTANCE)
.replaceIfs(RelCollationTraitDef.INSTANCE,
new Supplier<List<RelCollation>>() {
public List<RelCollation> get() {
return RelMdCollation.calc(mq, input, program);
}
})
.replaceIf(RelDistributionTraitDef.INSTANCE,
new Supplier<RelDistribution>() {
public RelDistribution get() {
return RelMdDistribution.calc(mq, input, program);
}
});
return new EnumerableCalc(cluster, traitSet, input, program);
}
示例8: OLAPRelMetadataProvider
import org.apache.calcite.rel.metadata.RelMdDistribution; //導入依賴的package包/類
public OLAPRelMetadataProvider() {
super(ImmutableList.of(RelMdPercentageOriginalRows.SOURCE, RelMdColumnOrigins.SOURCE,
RelMdExpressionLineage.SOURCE, RelMdTableReferences.SOURCE, RelMdNodeTypes.SOURCE,
OLAPRelMdRowCount.SOURCE, RelMdMaxRowCount.SOURCE, RelMdMinRowCount.SOURCE, RelMdUniqueKeys.SOURCE,
RelMdColumnUniqueness.SOURCE, RelMdPopulationSize.SOURCE, RelMdSize.SOURCE, RelMdParallelism.SOURCE,
RelMdDistribution.SOURCE, RelMdMemory.SOURCE, RelMdDistinctRowCount.SOURCE, RelMdSelectivity.SOURCE,
RelMdExplainVisibility.SOURCE, RelMdPredicates.SOURCE, RelMdAllPredicates.SOURCE,
RelMdCollation.SOURCE));
}