本文整理汇总了Java中org.apache.kylin.query.relnode.OLAPRel类的典型用法代码示例。如果您正苦于以下问题:Java OLAPRel类的具体用法?Java OLAPRel怎么用?Java OLAPRel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OLAPRel类属于org.apache.kylin.query.relnode包,在下文中一共展示了OLAPRel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onMatch
import org.apache.kylin.query.relnode.OLAPRel; //导入依赖的package包/类
@Override
public void onMatch(RelOptRuleCall call) {
final Sort sort = call.rel(0);
if (sort.offset == null && sort.fetch == null) {
return;
}
RelTraitSet origTraitSet = sort.getTraitSet();
RelTraitSet traitSet = origTraitSet.replace(OLAPRel.CONVENTION).simplify();
RelNode input = sort.getInput();
if (!sort.getCollation().getFieldCollations().isEmpty()) {
// Create a sort with the same sort key, but no offset or fetch.
input = sort.copy(sort.getTraitSet(), input, sort.getCollation(), null, null);
}
RelNode x = convert(input, input.getTraitSet().replace(OLAPRel.CONVENTION));
call.transformTo(new OLAPLimitRel(sort.getCluster(), traitSet, x, sort.offset, sort.fetch));
}
示例2: convert
import org.apache.kylin.query.relnode.OLAPRel; //导入依赖的package包/类
@Override
public RelNode convert(RelNode rel) {
LogicalAggregate agg = (LogicalAggregate) rel;
// AVG() will be transformed into SUM()/COUNT() by AggregateReduceFunctionsRule.
// Here only let the transformed plan pass.
if (containsAvg(agg)) {
return null;
}
RelTraitSet traitSet = agg.getTraitSet().replace(OLAPRel.CONVENTION);
try {
return new OLAPAggregateRel(agg.getCluster(), traitSet, convert(agg.getInput(), traitSet), agg.indicator, agg.getGroupSet(), agg.getGroupSets(), agg.getAggCallList());
} catch (InvalidRelException e) {
throw new IllegalStateException("Can't create OLAPAggregateRel!", e);
}
}
示例3: convert
import org.apache.kylin.query.relnode.OLAPRel; //导入依赖的package包/类
@Override
public RelNode convert(RelNode rel) {
final Union union = (Union) rel;
final RelTraitSet traitSet = union.getTraitSet().replace(OLAPRel.CONVENTION);
final List<RelNode> inputs = union.getInputs();
return new OLAPUnionRel(rel.getCluster(), traitSet, convertList(inputs, OLAPRel.CONVENTION), union.all);
}
示例4: convert
import org.apache.kylin.query.relnode.OLAPRel; //导入依赖的package包/类
@Override
public RelNode convert(RelNode rel) {
final Sort sort = (Sort) rel;
if (sort.offset != null || sort.fetch != null) {
return null;
}
final RelTraitSet traitSet = sort.getTraitSet().replace(OLAPRel.CONVENTION);
final RelNode input = sort.getInput();
return new OLAPSortRel(rel.getCluster(), traitSet, convert(input, input.getTraitSet().replace(OLAPRel.CONVENTION)), sort.getCollation(), sort.offset, sort.fetch);
}
示例5: convert
import org.apache.kylin.query.relnode.OLAPRel; //导入依赖的package包/类
@Override
public RelNode convert(RelNode rel) {
final Window window = (Window) rel;
final RelTraitSet traitSet = window.getTraitSet().replace(OLAPRel.CONVENTION);
final RelNode input = window.getInput();
return new OLAPWindowRel(rel.getCluster(), traitSet, convert(input, OLAPRel.CONVENTION), window.constants, window.getRowType(), window.groups);
}
示例6: onMatch
import org.apache.kylin.query.relnode.OLAPRel; //导入依赖的package包/类
@Override
public void onMatch(RelOptRuleCall call) {
LogicalFilter filter = call.rel(0);
RelTraitSet origTraitSet = filter.getTraitSet();
RelTraitSet traitSet = origTraitSet.replace(OLAPRel.CONVENTION).simplify();
OLAPFilterRel olapFilter = new OLAPFilterRel(filter.getCluster(), traitSet, convert(filter.getInput(), traitSet), filter.getCondition());
call.transformTo(olapFilter);
}
示例7: onMatch
import org.apache.kylin.query.relnode.OLAPRel; //导入依赖的package包/类
@Override
public void onMatch(RelOptRuleCall call) {
LogicalProject project = call.rel(0);
RelTraitSet origTraitSet = project.getTraitSet();
RelTraitSet traitSet = origTraitSet.replace(OLAPRel.CONVENTION).simplify();
OLAPProjectRel olapProj = new OLAPProjectRel(project.getCluster(), traitSet, //
convert(project.getInput(), traitSet), project.getProjects(), project.getRowType());
call.transformTo(olapProj);
}
示例8: convert
import org.apache.kylin.query.relnode.OLAPRel; //导入依赖的package包/类
@Override
public RelNode convert(RelNode rel) {
final SortRel sort = (SortRel) rel;
if (sort.offset != null || sort.fetch != null) {
return null;
}
final RelTraitSet traitSet = sort.getTraitSet().replace(OLAPRel.CONVENTION);
final RelNode input = sort.getChild();
return new OLAPSortRel(rel.getCluster(), traitSet, convert(input, input.getTraitSet().replace(OLAPRel.CONVENTION)), sort.getCollation(), sort.offset, sort.fetch);
}
示例9: onMatch
import org.apache.kylin.query.relnode.OLAPRel; //导入依赖的package包/类
@Override
public void onMatch(RelOptRuleCall call) {
FilterRel filter = call.rel(0);
RelTraitSet traitSet = filter.getTraitSet().replace(OLAPRel.CONVENTION);
OLAPFilterRel olapFilter = new OLAPFilterRel(filter.getCluster(), traitSet, convert(filter.getChild(), traitSet), filter.getCondition());
call.transformTo(olapFilter);
}
示例10: onMatch
import org.apache.kylin.query.relnode.OLAPRel; //导入依赖的package包/类
@Override
public void onMatch(RelOptRuleCall call) {
final SortRel sort = call.rel(0);
if (sort.offset == null && sort.fetch == null) {
return;
}
final RelTraitSet traitSet = sort.getTraitSet().replace(OLAPRel.CONVENTION);
RelNode input = sort.getChild();
if (!sort.getCollation().getFieldCollations().isEmpty()) {
// Create a sort with the same sort key, but no offset or fetch.
input = sort.copy(sort.getTraitSet(), input, sort.getCollation(), null, null);
}
RelNode x = convert(input, input.getTraitSet().replace(OLAPRel.CONVENTION));
call.transformTo(new OLAPLimitRel(sort.getCluster(), traitSet, x, sort.offset, sort.fetch));
}
示例11: convert
import org.apache.kylin.query.relnode.OLAPRel; //导入依赖的package包/类
@Override
public RelNode convert(RelNode rel) {
AggregateRel agg = (AggregateRel) rel;
RelTraitSet traitSet = agg.getTraitSet().replace(OLAPRel.CONVENTION);
try {
return new OLAPAggregateRel(agg.getCluster(), traitSet, convert(agg.getChild(), traitSet), agg.getGroupSet(), agg.getAggCallList());
} catch (InvalidRelException e) {
throw new IllegalStateException("Can't create OLAPAggregateRel!", e);
}
}
示例12: onMatch
import org.apache.kylin.query.relnode.OLAPRel; //导入依赖的package包/类
@Override
public void onMatch(RelOptRuleCall call) {
ProjectRel project = call.rel(0);
RelTraitSet traitSet = project.getTraitSet().replace(OLAPRel.CONVENTION);
OLAPProjectRel olapProj = new OLAPProjectRel(project.getCluster(), traitSet, //
convert(project.getChild(), traitSet), project.getProjects(), project.getRowType(), project.getFlags());
call.transformTo(olapProj);
}
示例13: OLAPJoinRule
import org.apache.kylin.query.relnode.OLAPRel; //导入依赖的package包/类
public OLAPJoinRule() {
super(LogicalJoin.class, Convention.NONE, OLAPRel.CONVENTION, "OLAPJoinRule");
}
示例14: OLAPUnionRule
import org.apache.kylin.query.relnode.OLAPRel; //导入依赖的package包/类
public OLAPUnionRule() {
super(Union.class, Convention.NONE, OLAPRel.CONVENTION, "OLAPUnionRule");
}
示例15: OLAPSortRule
import org.apache.kylin.query.relnode.OLAPRel; //导入依赖的package包/类
public OLAPSortRule() {
super(Sort.class, Convention.NONE, OLAPRel.CONVENTION, "OLAPSortRule");
}