• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java EnumerableConvention类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.hydromatic.optiq.rules.java.EnumerableConvention的典型用法代码示例。如果您正苦于以下问题:Java EnumerableConvention类的具体用法?Java EnumerableConvention怎么用?Java EnumerableConvention使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



EnumerableConvention类属于net.hydromatic.optiq.rules.java包,在下文中一共展示了EnumerableConvention类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: convert

import net.hydromatic.optiq.rules.java.EnumerableConvention; //导入依赖的package包/类
@Override
public RelNode convert(RelNode rel) {

	if (rel instanceof AggregateRel) {
		final AggregateRel agg = (AggregateRel) rel;
		final RelTraitSet traitSet = agg.getTraitSet().replace(
				EnumerableConvention.INSTANCE);
		try {
			return new GroupBy(rel.getCluster(), traitSet, convert(
					agg.getChild(), traitSet), agg.getGroupSet(),
					agg.getAggCallList(), accumuloAccessor);
		} catch (InvalidRelException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	} else
		return new EnumerableRelation(rel.getCluster(), rel.getTraitSet()
				.replace(getOutConvention()), rel);
}
 
开发者ID:joshelser,项目名称:cosmos,代码行数:21,代码来源:GroupByRule.java


示例2: convert

import net.hydromatic.optiq.rules.java.EnumerableConvention; //导入依赖的package包/类
@Override
public RelNode convert(RelNode rel) {
  final SortRel sort = (SortRel) rel;

  // do not handle other rules
  if (sort.offset == null && sort.fetch == null) {

    return sort;
  }

  final RelTraitSet traits = sort.getTraitSet().plus(EnumerableConvention.INSTANCE);

  RelNode input = sort.getChild();
  if (!sort.getCollation().getFieldCollations().isEmpty()) {
    input = sort.copy(sort.getTraitSet().replace(RelCollationImpl.EMPTY), input, RelCollationImpl.EMPTY, null, null);
  }

  final RelNode convertedInput = convert(input, input.getTraitSet().plus(EnumerableConvention.INSTANCE));

  return new EnumerableSort(sort.getCluster(), traits, convertedInput, sort.fetch, sort.offset, accumuloAccessor);
}
 
开发者ID:joshelser,项目名称:cosmos,代码行数:22,代码来源:LimitRule.java


示例3: toRel

import net.hydromatic.optiq.rules.java.EnumerableConvention; //导入依赖的package包/类
public RelNode toRel(
        RelOptTable.ToRelContext context,
        RelOptTable relOptTable) {
    return new JavaRules.EnumerableTableAccessRel(
            context.getCluster(),
            context.getCluster().traitSetOf(EnumerableConvention.INSTANCE),
            relOptTable,
            getElementType());
}
 
开发者ID:OSBI,项目名称:optiq-solr,代码行数:10,代码来源:SolrTable.java


示例4: toRel

import net.hydromatic.optiq.rules.java.EnumerableConvention; //导入依赖的package包/类
public RelNode toRel(
    RelOptTable.ToRelContext context,
    RelOptTable relOptTable) {
  return new JavaRules.EnumerableTableAccessRel(
      context.getCluster(),
      context.getCluster().traitSetOf(EnumerableConvention.INSTANCE),
      relOptTable,
      (Class) getElementType());
}
 
开发者ID:apache,项目名称:incubator-optiq-csv,代码行数:10,代码来源:JsonTable.java


示例5: implement

import net.hydromatic.optiq.rules.java.EnumerableConvention; //导入依赖的package包/类
@Override
public Result implement(EnumerableRelImplementor implementor, Prefer pref) {
    // keep it for having clause
    RexBuilder rexBuilder = getCluster().getRexBuilder();
    RelDataType inputRowType = getChild().getRowType();
    RexProgramBuilder programBuilder = new RexProgramBuilder(inputRowType, rexBuilder);
    programBuilder.addIdentity();
    programBuilder.addCondition(this.condition);
    RexProgram program = programBuilder.getProgram();

    EnumerableCalcRel enumCalcRel = new EnumerableCalcRel(getCluster(), getCluster().traitSetOf(EnumerableConvention.INSTANCE), getChild(), this.rowType, program, ImmutableList.<RelCollation> of());

    return enumCalcRel.implement(implementor, pref);
}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:15,代码来源:OLAPFilterRel.java


示例6: implement

import net.hydromatic.optiq.rules.java.EnumerableConvention; //导入依赖的package包/类
@Override
public Result implement(EnumerableRelImplementor implementor, Prefer pref) {
    OLAPRel childRel = (OLAPRel) getChild();
    childRel.replaceTraitSet(EnumerableConvention.INSTANCE);

    EnumerableLimitRel enumLimit = new EnumerableLimitRel(getCluster(), getCluster().traitSetOf(EnumerableConvention.INSTANCE), getChild(), localOffset, localFetch);
    Result res = enumLimit.implement(implementor, pref);

    childRel.replaceTraitSet(CONVENTION);

    return res;
}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:13,代码来源:OLAPLimitRel.java


示例7: implement

import net.hydromatic.optiq.rules.java.EnumerableConvention; //导入依赖的package包/类
@Override
public Result implement(EnumerableRelImplementor implementor, Prefer pref) {

    EnumerableAggregateRel enumAggRel;
    try {
        enumAggRel = new EnumerableAggregateRel(getCluster(), getCluster().traitSetOf(EnumerableConvention.INSTANCE), getChild(), this.groupSet, rewriteAggCalls);
    } catch (InvalidRelException e) {
        throw new IllegalStateException("Can't create EnumerableAggregateRel!", e);
    }

    return enumAggRel.implement(implementor, pref);
}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:13,代码来源:OLAPAggregateRel.java


示例8: GroupByRule

import net.hydromatic.optiq.rules.java.EnumerableConvention; //导入依赖的package包/类
public GroupByRule(DataTable<?> resultTable) {
	// when see an aggregate who has a child operand
	// super(resultTable,some(AggregateRel.class, Convention.NONE,
	// any(RelNode.class)));
	super(AggregateRel.class, Convention.NONE,
			EnumerableConvention.INSTANCE, "EnumerableAggregateRulsdfse");
	this.accumuloAccessor = resultTable;
}
 
开发者ID:joshelser,项目名称:cosmos,代码行数:9,代码来源:GroupByRule.java


示例9: toRel

import net.hydromatic.optiq.rules.java.EnumerableConvention; //导入依赖的package包/类
public RelNode toRel(RelOptTable.ToRelContext context, RelOptTable relOptTable) {
    return new JavaRules.EnumerableTableAccessRel(context.getCluster(),
        context.getCluster().traitSetOf(EnumerableConvention.INSTANCE),
        relOptTable, (Class) getElementType());
}
 
开发者ID:HenryOlson,项目名称:optiq-web,代码行数:6,代码来源:WebTable.java


示例10: OLAPToEnumerableConverterRule

import net.hydromatic.optiq.rules.java.EnumerableConvention; //导入依赖的package包/类
public OLAPToEnumerableConverterRule() {
    super(RelNode.class, OLAPRel.CONVENTION, EnumerableConvention.INSTANCE, "OLAPToEnumerableConverterRule");
}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:4,代码来源:OLAPToEnumerableConverterRule.java


示例11: FieldPacker

import net.hydromatic.optiq.rules.java.EnumerableConvention; //导入依赖的package包/类
public FieldPacker(TableScanner scanner) {
  super(CalcRel.class, Convention.NONE, EnumerableConvention.INSTANCE, "FieldPacker");
  this.scanner = scanner;
}
 
开发者ID:joshelser,项目名称:cosmos,代码行数:5,代码来源:FieldPacker.java


示例12: convert

import net.hydromatic.optiq.rules.java.EnumerableConvention; //导入依赖的package包/类
public RelNode convert(RelNode rel) {

    final CalcRel calc = (CalcRel) rel;

    final RexProgram program = calc.getProgram();

    RelDataType rowType = program.getOutputRowType();

    scanner.setFields(rowType.getFieldNames());

    if (RexMultisetUtil.containsMultiset(program) || program.containsAggs()) {
      return null;
    }

    return new FieldPackerRelation(rel.getCluster(), rel.getTraitSet().replace(EnumerableConvention.INSTANCE), convert(calc.getChild(), calc.getChild()
        .getTraitSet().replace(EnumerableConvention.INSTANCE)), program, ProjectRelBase.Flags.Boxed);
  }
 
开发者ID:joshelser,项目名称:cosmos,代码行数:18,代码来源:FieldPacker.java


示例13: implement

import net.hydromatic.optiq.rules.java.EnumerableConvention; //导入依赖的package包/类
@Override
public Result implement(EnumerableRelImplementor implementor, Prefer pref) {
    OLAPRel childRel = (OLAPRel) getChild();
    childRel.replaceTraitSet(EnumerableConvention.INSTANCE);

    EnumerableSortRel enumSort = new EnumerableSortRel(getCluster(), getCluster().traitSetOf(EnumerableConvention.INSTANCE, collation), getChild(), collation, offset, fetch);

    Result res = enumSort.implement(implementor, pref);

    childRel.replaceTraitSet(OLAPRel.CONVENTION);

    return res;
}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:14,代码来源:OLAPSortRel.java


示例14: EnumerableExpression

import net.hydromatic.optiq.rules.java.EnumerableConvention; //导入依赖的package包/类
private EnumerableExpression() {
  super(RelNode.class, CosmosRelNode.CONVENTION, EnumerableConvention.INSTANCE, "EnumerableRule");
  
}
 
开发者ID:joshelser,项目名称:cosmos,代码行数:5,代码来源:EnumerableExpression.java



注:本文中的net.hydromatic.optiq.rules.java.EnumerableConvention类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Builder类代码示例发布时间:2022-05-22
下一篇:
Java RegisteredServiceAttributeFilter类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap