(RelWriter pw)
| 260 | } |
| 261 | |
| 262 | @Override public RelWriter explainTerms(RelWriter pw) { |
| 263 | super.explainTerms(pw); |
| 264 | if (pw.nest()) { |
| 265 | pw.item("collation", collation); |
| 266 | } else { |
| 267 | for (Ord<RexNode> ord : Ord.zip(getSortExps())) { |
| 268 | pw.item("sort" + ord.i, ord.e); |
| 269 | } |
| 270 | for (Ord<RelFieldCollation> ord |
| 271 | : Ord.zip(collation.getFieldCollations())) { |
| 272 | if (!pw.expand()) { |
| 273 | pw.item("dir" + ord.i, ord.e.shortString()); |
| 274 | } else { |
| 275 | pw.item("dir" + ord.i, ord.e.fullString()); |
| 276 | } |
| 277 | } |
| 278 | } |
| 279 | pw.itemIf("offset", offset, offset != null); |
| 280 | pw.itemIf("fetch", fetch, fetch != null); |
| 281 | return pw; |
| 282 | } |
| 283 | |
| 284 | /** Returns the double value of a node if it is a literal, otherwise null. */ |
| 285 | private static @Nullable Double doubleValue(@Nullable RexNode r) { |
nothing calls this directly
no test coverage detected