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


Java RelWriter.item方法代码示例

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


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

示例1: explainTerms

import org.apache.calcite.rel.RelWriter; //导入方法依赖的package包/类
@Override
public RelWriter explainTerms(RelWriter pw) {
  pw.item("table", tableMetadata.getName());
  if(projectedColumns != null){
    pw.item("columns", FluentIterable.from(projectedColumns).transform(new Function<SchemaPath, String>(){

      @Override
      public String apply(SchemaPath input) {
        return input.toString();
      }}).join(Joiner.on(", ")));
  }

  pw.item("splits", getTableMetadata().getSplitCount());

  if(observedRowcountAdjustment != 1.0d){
    pw.item("rowAdjust", observedRowcountAdjustment);
  }

  return pw;
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:21,代码来源:ScanRelBase.java

示例2: 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

示例3: 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

示例4: explainTerms

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

示例5: explainTerms

import org.apache.calcite.rel.RelWriter; //导入方法依赖的package包/类
@Override
public RelWriter explainTerms(RelWriter pw) {
  pw = super.explainTerms(pw);
  if(conditions != null && !conditions.isEmpty()){
    return pw.item("filters",  conditions);
  }
  return pw;
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:9,代码来源:FilesystemScanDrel.java

示例6: explainTerms

import org.apache.calcite.rel.RelWriter; //导入方法依赖的package包/类
@Override public RelWriter explainTerms(RelWriter pw) {
  super.explainTerms(pw);
  for (Ord<RelNode> ord : Ord.zip(inputs)) {
    pw.input("input#" + ord.i, ord.e);
  }
  return pw.item("all", all);
}
 
开发者ID:apache,项目名称:calcite,代码行数:8,代码来源:SetOp.java

示例7: explainTerms

import org.apache.calcite.rel.RelWriter; //导入方法依赖的package包/类
public RelWriter explainTerms(RelWriter pw) {
  super.explainTerms(pw);
  for (Ord<Group> window : Ord.zip(groups)) {
    pw.item("window#" + window.i, window.e.toString());
  }
  return pw;
}
 
开发者ID:apache,项目名称:calcite,代码行数:8,代码来源:Window.java

示例8: 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

示例9: 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

示例10: explainTerms

import org.apache.calcite.rel.RelWriter; //导入方法依赖的package包/类
public RelWriter explainTerms(RelWriter pw) {
  super.explainTerms(pw);
  for (Ord<RelNode> ord : Ord.zip(inputs)) {
    pw.input("input#" + ord.i, ord.e);
  }
  pw.item("invocation", rexCall)
    .item("rowType", rowType);
  if (elementType != null) {
    pw.item("elementType", elementType);
  }
  return pw;
}
 
开发者ID:apache,项目名称:calcite,代码行数:13,代码来源:TableFunctionScan.java

示例11: explain

import org.apache.calcite.rel.RelWriter; //导入方法依赖的package包/类
@Override public void explain(RelWriter pw) {
  // Not a typical implementation of "explain". We don't gather terms &
  // values to be printed later. We actually do the work.
  String s = getDescription();
  pw.item("subset", s);
  final AbstractRelNode input =
      (AbstractRelNode) Util.first(getBest(), getOriginal());
  if (input == null) {
    return;
  }
  input.explainTerms(pw);
  pw.done(input);
}
 
开发者ID:apache,项目名称:calcite,代码行数:14,代码来源:RelSubset.java

示例12: explainTerms

import org.apache.calcite.rel.RelWriter; //导入方法依赖的package包/类
public RelWriter explainTerms(RelWriter pw) {
  super.explainTerms(pw);
  for (RelTrait trait : traitSet) {
    pw.item(trait.getTraitDef().getSimpleName(), trait);
  }
  return pw;
}
 
开发者ID:apache,项目名称:calcite,代码行数:8,代码来源:AbstractConverter.java

示例13: explainTerms

import org.apache.calcite.rel.RelWriter; //导入方法依赖的package包/类
@Override
public RelWriter explainTerms(RelWriter pw) {
  return pw.item("schema", schema.toString());
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:5,代码来源:EmptyRel.java


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