org.apache.calcite.rel.RelFieldCollation.shift()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(111)

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

RelFieldCollation.shift介绍

[英]Returns a copy of this RelFieldCollation with the field index shifted offset to the right.
[中]返回此RelFieldCollation的副本,字段索引向右偏移。

代码示例

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

public static RelCollation shift(RelCollation collation, int offset) {
  if (offset == 0) {
   return collation; // save some effort
  }
  final ImmutableList.Builder<RelFieldCollation> fieldCollations =
    ImmutableList.builder();
  for (RelFieldCollation fc : collation.getFieldCollations()) {
   fieldCollations.add(fc.shift(offset));
  }
  return new RelCollationImpl(fieldCollations.build());
 }
}

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

public static RelCollation shift(RelCollation collation, int offset) {
 if (offset == 0) {
  return collation; // save some effort
 }
 final ImmutableList.Builder<RelFieldCollation> fieldCollations =
   ImmutableList.builder();
 for (RelFieldCollation fc : collation.getFieldCollations()) {
  fieldCollations.add(fc.shift(offset));
 }
 return new RelCollationImpl(fieldCollations.build());
}

相关文章