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

org.apache.calcite.rel.core.Project.getPermutation()方法的使用及代码示例

本文整理了Java中org.apache.calcite.rel.core.Project.getPermutation()方法的一些代码示例,展示了Pro

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

Project.getPermutation介绍

[英]Returns a permutation, if this projection is merely a permutation of its input fields; otherwise null.
[中]如果此投影只是其输入字段的排列,则返回一个排列;否则为空。

代码示例

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

final Permutation topPermutation = topProject.getPermutation();
if (topPermutation == null) {
return;
final Permutation bottomPermutation = bottomProject.getPermutation();
if (bottomPermutation == null) {
return;

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

final Permutation topPermutation = topProject.getPermutation();
if (topPermutation == null) {
return;
final Permutation bottomPermutation = bottomProject.getPermutation();
if (bottomPermutation == null) {
return;

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

/**
* Returns a permutation, if this projection is merely a permutation of its
* input fields; otherwise null.
*
* @return Permutation, if this projection is merely a permutation of its
* input fields; otherwise null
*/
public Permutation getPermutation() {
return getPermutation(getInput().getRowType().getFieldCount(), exps);
}

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

/**
* Returns a permutation, if this projection is merely a permutation of its
* input fields; otherwise null.
*
* @return Permutation, if this projection is merely a permutation of its
* input fields; otherwise null
*/
public Permutation getPermutation() {
return getPermutation(getInput().getRowType().getFieldCount(), exps);
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

final Permutation topPermutation = topProject.getPermutation();
if (topPermutation == null) {
return;
final Permutation bottomPermutation = bottomProject.getPermutation();
if (bottomPermutation == null) {
return;

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

@Test public void testProjectPermutation() {
final RelDataTypeFactory typeFactory = new JavaTypeFactoryImpl();
final RexBuilder builder = new RexBuilder(typeFactory);
final RelDataType doubleType =
typeFactory.createSqlType(SqlTypeName.DOUBLE);
// A project with [1, 1] is not a permutation, so should return null
final Permutation perm = Project.getPermutation(2,
ImmutableList.of(builder.makeInputRef(doubleType, 1),
builder.makeInputRef(doubleType, 1)));
assertThat(perm, nullValue());
// A project with [0, 1, 0] is not a permutation, so should return null
final Permutation perm1 = Project.getPermutation(2,
ImmutableList.of(builder.makeInputRef(doubleType, 0),
builder.makeInputRef(doubleType, 1),
builder.makeInputRef(doubleType, 0)));
assertThat(perm1, nullValue());
// A project of [1, 0] is a valid permutation!
final Permutation perm2 = Project.getPermutation(2,
ImmutableList.of(builder.makeInputRef(doubleType, 1),
builder.makeInputRef(doubleType, 0)));
assertThat(perm2, is(new Permutation(new int[]{1, 0})));
}
}

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

@Test public void testProjectPermutation() {
final RelDataTypeFactory typeFactory = new JavaTypeFactoryImpl();
final RexBuilder builder = new RexBuilder(typeFactory);
final RelDataType doubleType =
typeFactory.createSqlType(SqlTypeName.DOUBLE);
// A project with [1, 1] is not a permutation, so should return null
final Permutation perm = Project.getPermutation(2,
ImmutableList.of(builder.makeInputRef(doubleType, 1),
builder.makeInputRef(doubleType, 1)));
assertThat(perm, nullValue());
// A project with [0, 1, 0] is not a permutation, so should return null
final Permutation perm1 = Project.getPermutation(2,
ImmutableList.of(builder.makeInputRef(doubleType, 0),
builder.makeInputRef(doubleType, 1),
builder.makeInputRef(doubleType, 0)));
assertThat(perm1, nullValue());
// A project of [1, 0] is a valid permutation!
final Permutation perm2 = Project.getPermutation(2,
ImmutableList.of(builder.makeInputRef(doubleType, 1),
builder.makeInputRef(doubleType, 0)));
assertThat(perm2, is(new Permutation(new int[]{1, 0})));
}
}

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

final RelNode relB = bottomJoin.getRight();
final RelOptCluster cluster = topJoin.getCluster();
final Permutation projectPermu = projectOnBottomJoin.getPermutation();
final Permutation inverseProjectPermu = projectPermu.inverse();

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

final Permutation topPermutation = topProject.getPermutation();
if (topPermutation != null) {
if (topPermutation.isIdentity()) {
final Permutation bottomPermutation = bottomProject.getPermutation();
if (bottomPermutation != null) {
if (bottomPermutation.isIdentity()) {

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

final Permutation topPermutation = topProject.getPermutation();
if (topPermutation != null) {
if (topPermutation.isIdentity()) {
final Permutation bottomPermutation = bottomProject.getPermutation();
if (bottomPermutation != null) {
if (bottomPermutation.isIdentity()) {

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

final Permutation topPermutation = topProject.getPermutation();
if (topPermutation != null) {
if (topPermutation.isIdentity()) {
final Permutation bottomPermutation = bottomProject.getPermutation();
if (bottomPermutation != null) {
if (bottomPermutation.isIdentity()) {

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

final Permutation topPermutation = topProject.getPermutation();
if (topPermutation != null) {
if (topPermutation.isIdentity()) {
final Permutation bottomPermutation = bottomProject.getPermutation();
if (bottomPermutation != null) {
if (bottomPermutation.isIdentity()) {

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