本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例13: explainTerms
import org.apache.calcite.rel.RelWriter; //导入方法依赖的package包/类
@Override
public RelWriter explainTerms(RelWriter pw) {
return pw.item("schema", schema.toString());
}