本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}