当前位置: 首页>>代码示例>>Java>>正文


Java RelWriter.nest方法代码示例

本文整理汇总了Java中org.apache.calcite.rel.RelWriter.nest方法的典型用法代码示例。如果您正苦于以下问题:Java RelWriter.nest方法的具体用法?Java RelWriter.nest怎么用?Java RelWriter.nest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.calcite.rel.RelWriter的用法示例。


在下文中一共展示了RelWriter.nest方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: explainTerms

import org.apache.calcite.rel.RelWriter; //导入方法依赖的package包/类
public RelWriter explainTerms(RelWriter pw) {
  // We skip the "groups" element if it is a singleton of "group".
  pw.item("group", groupSet)
      .itemIf("window", windowFn, windowFn != null)
      .itemIf("trigger", trigger, trigger != null)
      .itemIf("event_time", windowFieldIdx, windowFieldIdx != -1)
      .itemIf("groups", groupSets, getGroupType() != Group.SIMPLE)
      .itemIf("indicator", indicator, indicator)
      .itemIf("aggs", aggCalls, pw.nest());
  if (!pw.nest()) {
    for (Ord<AggregateCall> ord : Ord.zip(aggCalls)) {
      pw.item(Util.first(ord.e.name, "agg#" + ord.i), ord.e);
    }
  }
  return pw;
}
 
开发者ID:apache,项目名称:beam,代码行数:17,代码来源:BeamAggregationRel.java

示例2: explainTerms

import org.apache.calcite.rel.RelWriter; //导入方法依赖的package包/类
@Override
public RelWriter explainTerms(RelWriter pw) {
  super.explainTerms(pw);
  if (pw.nest()) {
    pw.item("collation", collation);
  } else {
    for (Ord<RelFieldCollation> ord : Ord.zip(collation.getFieldCollations())) {
      pw.item("sort" + ord.i, ord.e);
    }
  }
  return pw;
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:13,代码来源:SingleMergeExchangePrel.java

示例3: explainTerms

import org.apache.calcite.rel.RelWriter; //导入方法依赖的package包/类
public RelWriter explainTerms(RelWriter pw) {
  // We skip the "groups" element if it is a singleton of "group".
  super.explainTerms(pw)
      .item("group", groupSet)
      .itemIf("groups", groupSets, getGroupType() != Group.SIMPLE)
      .itemIf("indicator", indicator, indicator)
      .itemIf("aggs", aggCalls, pw.nest());
  if (!pw.nest()) {
    for (Ord<AggregateCall> ord : Ord.zip(aggCalls)) {
      pw.item(Util.first(ord.e.name, "agg#" + ord.i), ord.e);
    }
  }
  return pw;
}
 
开发者ID:apache,项目名称:calcite,代码行数:15,代码来源:Aggregate.java

示例4: explainTerms

import org.apache.calcite.rel.RelWriter; //导入方法依赖的package包/类
public RelWriter explainTerms(RelWriter pw) {
  super.explainTerms(pw);
  if (pw.nest()) {
    pw.item("fields", rowType.getFieldNames());
    pw.item("exprs", exps);
  } else {
    for (Ord<RelDataTypeField> field : Ord.zip(rowType.getFieldList())) {
      String fieldName = field.e.getName();
      if (fieldName == null) {
        fieldName = "field#" + field.i;
      }
      pw.item(fieldName, exps.get(field.i));
    }
  }

  // If we're generating a digest, include the rowtype. If two projects
  // differ in return type, we don't want to regard them as equivalent,
  // otherwise we will try to put rels of different types into the same
  // planner equivalence set.
  //CHECKSTYLE: IGNORE 2
  if ((pw.getDetailLevel() == SqlExplainLevel.DIGEST_ATTRIBUTES)
      && false) {
    pw.item("type", rowType);
  }

  return pw;
}
 
开发者ID:apache,项目名称:calcite,代码行数:28,代码来源:Project.java


注:本文中的org.apache.calcite.rel.RelWriter.nest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。