Example #1
0
 public RelOptPlanWriter explainTerms(RelOptPlanWriter pw) {
   super.explainTerms(pw);
   assert fieldExps.length == collations.size();
   for (Ord<RexNode> ord : Ord.zip(fieldExps)) {
     pw.item("sort" + ord.i, ord.e);
   }
   for (Ord<RelFieldCollation> ord : Ord.zip(collations)) {
     pw.item("dir" + ord.i, ord.e.shortString());
   }
   return pw;
 }
Example #2
0
 public RelWriter explainTerms(RelWriter pw) {
   super.explainTerms(pw);
   assert fieldExps.size() == collation.getFieldCollations().size();
   if (pw.nest()) {
     pw.item("collation", collation);
   } else {
     for (Ord<RexNode> ord : Ord.zip(fieldExps)) {
       pw.item("sort" + ord.i, ord.e);
     }
     for (Ord<RelFieldCollation> ord : Ord.zip(collation.getFieldCollations())) {
       pw.item("dir" + ord.i, ord.e.shortString());
     }
   }
   pw.itemIf("offset", offset, offset != null);
   pw.itemIf("fetch", fetch, fetch != null);
   return pw;
 }