热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.apache.calcite.rel.logical.LogicalSort类的使用及代码示例

本文整理了Java中org.apache.calcite.rel.logical.LogicalSort类的一些代码示例,展示了LogicalSort类的具体用法。这些代码示例主要来源于Github/

本文整理了Java中org.apache.calcite.rel.logical.LogicalSort类的一些代码示例,展示了LogicalSort类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LogicalSort类的具体详情如下:
包路径:org.apache.calcite.rel.logical.LogicalSort
类名称:LogicalSort

LogicalSort介绍

[英]Sub-class of org.apache.calcite.rel.core.Sort not targeted at any particular engine or calling convention.
[中]组织的子类。阿帕奇。方解石雷尔。果心排序不针对任何特定引擎或调用约定。

代码示例

代码示例来源:origin: apache/drill

case SORT:
final MutableSort sort = (MutableSort) node;
return LogicalSort.create(fromMutable(sort.input), sort.collation,
sort.offset, sort.fetch);
case UNION:

代码示例来源:origin: dremio/dremio-oss

@Override
public RelNode visit(LogicalSort sort) {
final RelNode input = sort.getInput().accept(this);
return new LogicalSort(
cluster,
copyOf(sort.getTraitSet()),
input,
sort.getCollation(),
copyOf(sort.offset),
copyOf(sort.fetch)
);
}

代码示例来源:origin: Qihoo360/Quicksql

@Override public Sort copy(RelTraitSet traitSet, RelNode newInput,
RelCollation newCollation, RexNode offset, RexNode fetch) {
return new LogicalSort(getCluster(), traitSet, newInput, newCollation,
offset, fetch);
}

代码示例来源:origin: org.apache.kylin/atopcalcite

rootSort = LogicalSort.create(rootPrj, newCollation, rootSort.offset, rootSort.fetch);
root = new RelRoot(rootSort == null ? rootPrj : rootSort, validRowType, root.kind, projFields, rootSort == null ? root.collation : rootSort.getCollation());

代码示例来源:origin: org.apache.calcite/calcite-core

/**
* Creates a LogicalSort.
*
* @param input Input relational expression
* @param collation array of sort specifications
* @param offset Expression for number of rows to discard before returning
* first row
* @param fetch Expression for number of rows to fetch
*/
public static LogicalSort create(RelNode input, RelCollation collation,
RexNode offset, RexNode fetch) {
RelOptCluster cluster = input.getCluster();
collation = RelCollationTraitDef.INSTANCE.canonize(collation);
RelTraitSet traitSet =
input.getTraitSet().replace(Convention.NONE).replace(collation);
return new LogicalSort(cluster, traitSet, input, collation, offset, fetch);
}

代码示例来源:origin: Qihoo360/Quicksql

@Override
public RelNode visit(LogicalSort sort) {
return sort.getInput().accept(this);
}

代码示例来源:origin: Qihoo360/Quicksql

/**
* Creates a LogicalSort.
*
* @param input Input relational expression
* @param collation array of sort specifications
* @param offset Expression for number of rows to discard before returning
* first row
* @param fetch Expression for number of rows to fetch
*/
public static LogicalSort create(RelNode input, RelCollation collation,
RexNode offset, RexNode fetch) {
RelOptCluster cluster = input.getCluster();
collation = RelCollationTraitDef.INSTANCE.canonize(collation);
RelTraitSet traitSet =
input.getTraitSet().replace(Convention.NONE).replace(collation);
return new LogicalSort(cluster, traitSet, input, collation, offset, fetch);
}

代码示例来源:origin: org.apache.calcite/calcite-core

public RelNode createSort(RelNode input, RelCollation collation,
RexNode offset, RexNode fetch) {
return LogicalSort.create(input, collation, offset, fetch);
}

代码示例来源:origin: org.apache.calcite/calcite-core

@Override public Sort copy(RelTraitSet traitSet, RelNode newInput,
RelCollation newCollation, RexNode offset, RexNode fetch) {
return new LogicalSort(getCluster(), traitSet, newInput, newCollation,
offset, fetch);
}

代码示例来源:origin: Qihoo360/Quicksql

public RelNode createSort(RelNode input, RelCollation collation,
RexNode offset, RexNode fetch) {
return LogicalSort.create(input, collation, offset, fetch);
}

代码示例来源:origin: org.apache.drill.exec/drill-java-exec

private static RelNode createEmptyEmptyRelHelper(SingleRel input) {
return LogicalSort.create(input.getInput(), RelCollations.EMPTY,
input.getCluster().getRexBuilder().makeExactLiteral(BigDecimal.valueOf(0)),
input.getCluster().getRexBuilder().makeExactLiteral(BigDecimal.valueOf(0)));
}
}

代码示例来源:origin: Qihoo360/Quicksql

public RelNode convert(
RelOptPlanner planner,
RelNode rel,
RelCollation toCollation,
boolean allowInfiniteCostConverters) {
if (toCollation.getFieldCollations().isEmpty()) {
// An empty sort doesn't make sense.
return null;
}
// Create a logical sort, then ask the planner to convert its remaining
// traits (e.g. convert it to an EnumerableSortRel if rel is enumerable
// convention)
final Sort sort = LogicalSort.create(rel, toCollation, null, null);
RelNode newRel = planner.register(sort, rel);
final RelTraitSet newTraitSet = rel.getTraitSet().replace(toCollation);
if (!newRel.getTraitSet().equals(newTraitSet)) {
newRel = planner.changeTraits(newRel, newTraitSet);
}
return newRel;
}

代码示例来源:origin: Qihoo360/Quicksql

@Override public void onMatch(RelOptRuleCall call) {
final Delta delta = call.rel(0);
Util.discard(delta);
final Sort sort = call.rel(1);
final LogicalDelta newDelta =
LogicalDelta.create(sort.getInput());
final LogicalSort newSort =
LogicalSort.create(newDelta, sort.collation, sort.offset, sort.fetch);
call.transformTo(newSort);
}
}

代码示例来源:origin: org.apache.calcite/calcite-core

@Override public void onMatch(RelOptRuleCall call) {
final Delta delta = call.rel(0);
Util.discard(delta);
final Sort sort = call.rel(1);
final LogicalDelta newDelta =
LogicalDelta.create(sort.getInput());
final LogicalSort newSort =
LogicalSort.create(newDelta, sort.collation, sort.offset, sort.fetch);
call.transformTo(newSort);
}
}

代码示例来源:origin: Qihoo360/Quicksql

LogicalSort.create(bb.root, collation,
offset == null ? null : convertExpression(offset),
fetch == null ? null : convertExpression(fetch)),

代码示例来源:origin: org.apache.calcite/calcite-core

public RelNode convert(
RelOptPlanner planner,
RelNode rel,
RelCollation toCollation,
boolean allowInfiniteCostConverters) {
if (toCollation.getFieldCollations().isEmpty()) {
// An empty sort doesn't make sense.
return null;
}
// Create a logical sort, then ask the planner to convert its remaining
// traits (e.g. convert it to an EnumerableSortRel if rel is enumerable
// convention)
final Sort sort = LogicalSort.create(rel, toCollation, null, null);
RelNode newRel = planner.register(sort, rel);
final RelTraitSet newTraitSet = rel.getTraitSet().replace(toCollation);
if (!newRel.getTraitSet().equals(newTraitSet)) {
newRel = planner.changeTraits(newRel, newTraitSet);
}
return newRel;
}

代码示例来源:origin: org.apache.flink/flink-table_2.10

LogicalSort.create(bb.root, collation,
offset == null ? null : convertExpression(offset),
fetch == null ? null : convertExpression(fetch)),

代码示例来源:origin: org.apache.calcite/calcite-core

LogicalSort.create(bb.root, collation,
offset == null ? null : convertExpression(offset),
fetch == null ? null : convertExpression(fetch)),

代码示例来源:origin: org.apache.kylin/atopcalcite

LogicalSort.create(bb.root, collation,
offset == null ? null : convertExpression(offset),
fetch == null ? null : convertExpression(fetch)),

代码示例来源:origin: org.apache.calcite/calcite-core

LogicalSort.create(newInput, newCollation, rel.offset, rel.fetch);

推荐阅读
author-avatar
手机用户2502873151
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有