Skip to content

Commit

Permalink
Render output layout in a separate line
Browse files Browse the repository at this point in the history
It makes it easier to visually separate it from the main details of the given
operation.

Example:

- ScanFilterProject[table = tpch:orders:sf0.01, filterPredicate = ("orderdate" > DATE '2019-01-01')]
         Layout: [orderdate:date, orderstatus:varchar(1), expr:double]
         Estimates: {rows: 15000 (278.32kB), cpu: 285003.00, memory: 0.00, network: 0.00}/{rows: 0 (0B), cpu: 570006.00, memory: 0.00, network
         expr := ("totalprice" / 1E3)
         orderstatus := tpch:orderstatus
             :: [[F], [O], [P]]
         totalprice := tpch:totalprice
         orderdate := tpch:orderdate
  • Loading branch information
martint committed Apr 29, 2019
1 parent c7cc72d commit ac69d48
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ private String writeTextOutput(StringBuilder output, PlanRepresentation plan, in
.append("- ")
.append(node.getName())
.append(node.getIdentifier())
.append(" => [")
.append(node.getOutputs().stream()
.map(s -> s.getSymbol() + ":" + s.getType())
.collect(joining(", ")))
.append("]\n");
.append("\n");

String columns = node.getOutputs().stream()
.map(s -> s.getSymbol() + ":" + s.getType())
.collect(joining(", "));

output.append(indentMultilineString("Layout: [" + columns + "]\n", level + 2));

String estimates = printEstimates(plan, node);
if (!estimates.isEmpty()) {
Expand Down

0 comments on commit ac69d48

Please sign in to comment.