Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exec: make the output of explain(vec) more compact #40565

Merged
merged 1 commit into from
Sep 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/sql/explain_vec.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (n *explainVecNode) startExec(params runParams) error {
}
// Sort backward, since the first thing you add to a treeprinter will come last.
sort.Slice(sortedFlows, func(i, j int) bool { return sortedFlows[i].nodeID < sortedFlows[j].nodeID })
tp := treeprinter.New()
tp := treeprinter.NewWithIndent(false /* leftPad */, true /* rightPad */, 0 /* edgeLength */)
root := tp.Child("")
verbose := n.options.Flags.Contains(tree.ExplainFlagVerbose)
for _, flow := range sortedFlows {
Expand Down
342 changes: 171 additions & 171 deletions pkg/sql/logictest/testdata/logic_test/dist_vectorize
Original file line number Diff line number Diff line change
Expand Up @@ -89,178 +89,178 @@ RESET optimizer
query T
EXPLAIN (VEC, VERBOSE) SELECT count(*) FROM kv
----
├── Node 1
│ └── *distsqlrun.materializer
└── *exec.orderedAggregator
└── *exec.oneShotOp
└── *exec.distinctChainOps
└── *exec.UnorderedSynchronizer
├── *exec.countOp
│ └── *exec.simpleProjectOp
└── *exec.CancelChecker
└── *distsqlrun.colBatchScan
├── *colrpc.Inbox
├── *colrpc.Inbox
├── *colrpc.Inbox
└── *colrpc.Inbox
├── Node 2
│ └── *colrpc.Outbox
└── *exec.deselectorOp
└── *exec.countOp
└── *exec.simpleProjectOp
└── *exec.CancelChecker
└── *distsqlrun.colBatchScan
├── Node 3
│ └── *colrpc.Outbox
└── *exec.deselectorOp
└── *exec.countOp
└── *exec.simpleProjectOp
└── *exec.CancelChecker
└── *distsqlrun.colBatchScan
├── Node 4
│ └── *colrpc.Outbox
└── *exec.deselectorOp
└── *exec.countOp
└── *exec.simpleProjectOp
└── *exec.CancelChecker
└── *distsqlrun.colBatchScan
└── Node 5
└── *colrpc.Outbox
└── *exec.deselectorOp
└── *exec.countOp
└── *exec.simpleProjectOp
└── *exec.CancelChecker
└── *distsqlrun.colBatchScan
Node 1
│ └ *distsqlrun.materializer
*exec.orderedAggregator
*exec.oneShotOp
*exec.distinctChainOps
*exec.UnorderedSynchronizer
*exec.countOp
│ └ *exec.simpleProjectOp
│ │ *exec.CancelChecker
│ │ *distsqlrun.colBatchScan
*colrpc.Inbox
*colrpc.Inbox
*colrpc.Inbox
*colrpc.Inbox
Node 2
│ └ *colrpc.Outbox
*exec.deselectorOp
*exec.countOp
*exec.simpleProjectOp
*exec.CancelChecker
*distsqlrun.colBatchScan
Node 3
│ └ *colrpc.Outbox
*exec.deselectorOp
*exec.countOp
*exec.simpleProjectOp
*exec.CancelChecker
*distsqlrun.colBatchScan
Node 4
│ └ *colrpc.Outbox
*exec.deselectorOp
*exec.countOp
*exec.simpleProjectOp
*exec.CancelChecker
*distsqlrun.colBatchScan
Node 5
*colrpc.Outbox
*exec.deselectorOp
*exec.countOp
*exec.simpleProjectOp
*exec.CancelChecker
*distsqlrun.colBatchScan

query T
EXPLAIN (VEC, VERBOSE) SELECT count(*) FROM kv NATURAL INNER HASH JOIN kv kv2
----
├── Node 1
│ └── *distsqlrun.materializer
└── *exec.orderedAggregator
└── *exec.oneShotOp
└── *exec.distinctChainOps
└── *exec.UnorderedSynchronizer
├── *exec.countOp
│ └── *exec.simpleProjectOp
└── *exec.hashJoinEqOp
├── *exec.UnorderedSynchronizer
│ ├── *exec.routerOutputOp
│ │ └── *exec.HashRouter
└── *exec.CancelChecker
└── *distsqlrun.colBatchScan
│ ├── *colrpc.Inbox
│ ├── *colrpc.Inbox
│ ├── *colrpc.Inbox
│ └── *colrpc.Inbox
└── *exec.UnorderedSynchronizer
├── *exec.routerOutputOp
│ └── *exec.HashRouter
└── *exec.CancelChecker
└── *distsqlrun.colBatchScan
├── *colrpc.Inbox
├── *colrpc.Inbox
├── *colrpc.Inbox
└── *colrpc.Inbox
├── *colrpc.Inbox
├── *colrpc.Inbox
├── *colrpc.Inbox
└── *colrpc.Inbox
├── Node 2
│ └── *colrpc.Outbox
└── *exec.deselectorOp
└── *exec.countOp
└── *exec.simpleProjectOp
└── *exec.hashJoinEqOp
├── *exec.UnorderedSynchronizer
│ ├── *colrpc.Inbox
│ ├── *exec.routerOutputOp
│ │ └── *exec.HashRouter
└── *exec.CancelChecker
└── *distsqlrun.colBatchScan
│ ├── *colrpc.Inbox
│ ├── *colrpc.Inbox
│ └── *colrpc.Inbox
└── *exec.UnorderedSynchronizer
├── *colrpc.Inbox
├── *exec.routerOutputOp
│ └── *exec.HashRouter
└── *exec.CancelChecker
└── *distsqlrun.colBatchScan
├── *colrpc.Inbox
├── *colrpc.Inbox
└── *colrpc.Inbox
├── Node 3
│ └── *colrpc.Outbox
└── *exec.deselectorOp
└── *exec.countOp
└── *exec.simpleProjectOp
└── *exec.hashJoinEqOp
├── *exec.UnorderedSynchronizer
│ ├── *colrpc.Inbox
│ ├── *colrpc.Inbox
│ ├── *exec.routerOutputOp
│ │ └── *exec.HashRouter
└── *exec.CancelChecker
└── *distsqlrun.colBatchScan
│ ├── *colrpc.Inbox
│ └── *colrpc.Inbox
└── *exec.UnorderedSynchronizer
├── *colrpc.Inbox
├── *colrpc.Inbox
├── *exec.routerOutputOp
│ └── *exec.HashRouter
└── *exec.CancelChecker
└── *distsqlrun.colBatchScan
├── *colrpc.Inbox
└── *colrpc.Inbox
├── Node 4
│ └── *colrpc.Outbox
└── *exec.deselectorOp
└── *exec.countOp
└── *exec.simpleProjectOp
└── *exec.hashJoinEqOp
├── *exec.UnorderedSynchronizer
│ ├── *colrpc.Inbox
│ ├── *colrpc.Inbox
│ ├── *colrpc.Inbox
│ ├── *exec.routerOutputOp
│ │ └── *exec.HashRouter
└── *exec.CancelChecker
└── *distsqlrun.colBatchScan
│ └── *colrpc.Inbox
└── *exec.UnorderedSynchronizer
├── *colrpc.Inbox
├── *colrpc.Inbox
├── *colrpc.Inbox
├── *exec.routerOutputOp
│ └── *exec.HashRouter
└── *exec.CancelChecker
└── *distsqlrun.colBatchScan
└── *colrpc.Inbox
└── Node 5
└── *colrpc.Outbox
└── *exec.deselectorOp
└── *exec.countOp
└── *exec.simpleProjectOp
└── *exec.hashJoinEqOp
├── *exec.UnorderedSynchronizer
│ ├── *colrpc.Inbox
│ ├── *colrpc.Inbox
│ ├── *colrpc.Inbox
│ ├── *colrpc.Inbox
│ └── *exec.routerOutputOp
└── *exec.HashRouter
└── *exec.CancelChecker
└── *distsqlrun.colBatchScan
└── *exec.UnorderedSynchronizer
├── *colrpc.Inbox
├── *colrpc.Inbox
├── *colrpc.Inbox
├── *colrpc.Inbox
└── *exec.routerOutputOp
└── *exec.HashRouter
└── *exec.CancelChecker
└── *distsqlrun.colBatchScan
Node 1
│ └ *distsqlrun.materializer
*exec.orderedAggregator
*exec.oneShotOp
*exec.distinctChainOps
*exec.UnorderedSynchronizer
*exec.countOp
│ └ *exec.simpleProjectOp
│ │ *exec.hashJoinEqOp
│ │ *exec.UnorderedSynchronizer
│ │ │ ├ *exec.routerOutputOp
│ │ │ │ └ *exec.HashRouter
│ │ *exec.CancelChecker
│ │ *distsqlrun.colBatchScan
│ │ │ ├ *colrpc.Inbox
│ │ │ ├ *colrpc.Inbox
│ │ │ ├ *colrpc.Inbox
│ │ │ └ *colrpc.Inbox
│ │ *exec.UnorderedSynchronizer
│ │ *exec.routerOutputOp
│ │ │ └ *exec.HashRouter
│ │ │ *exec.CancelChecker
│ │ │ *distsqlrun.colBatchScan
│ │ *colrpc.Inbox
│ │ *colrpc.Inbox
│ │ *colrpc.Inbox
│ │ *colrpc.Inbox
*colrpc.Inbox
*colrpc.Inbox
*colrpc.Inbox
*colrpc.Inbox
Node 2
│ └ *colrpc.Outbox
*exec.deselectorOp
*exec.countOp
*exec.simpleProjectOp
*exec.hashJoinEqOp
*exec.UnorderedSynchronizer
│ ├ *colrpc.Inbox
│ ├ *exec.routerOutputOp
│ │ └ *exec.HashRouter
*exec.CancelChecker
*distsqlrun.colBatchScan
│ ├ *colrpc.Inbox
│ ├ *colrpc.Inbox
│ └ *colrpc.Inbox
*exec.UnorderedSynchronizer
*colrpc.Inbox
*exec.routerOutputOp
│ └ *exec.HashRouter
│ │ *exec.CancelChecker
│ │ *distsqlrun.colBatchScan
*colrpc.Inbox
*colrpc.Inbox
*colrpc.Inbox
Node 3
│ └ *colrpc.Outbox
*exec.deselectorOp
*exec.countOp
*exec.simpleProjectOp
*exec.hashJoinEqOp
*exec.UnorderedSynchronizer
│ ├ *colrpc.Inbox
│ ├ *colrpc.Inbox
│ ├ *exec.routerOutputOp
│ │ └ *exec.HashRouter
*exec.CancelChecker
*distsqlrun.colBatchScan
│ ├ *colrpc.Inbox
│ └ *colrpc.Inbox
*exec.UnorderedSynchronizer
*colrpc.Inbox
*colrpc.Inbox
*exec.routerOutputOp
│ └ *exec.HashRouter
│ │ *exec.CancelChecker
│ │ *distsqlrun.colBatchScan
*colrpc.Inbox
*colrpc.Inbox
Node 4
│ └ *colrpc.Outbox
*exec.deselectorOp
*exec.countOp
*exec.simpleProjectOp
*exec.hashJoinEqOp
*exec.UnorderedSynchronizer
│ ├ *colrpc.Inbox
│ ├ *colrpc.Inbox
│ ├ *colrpc.Inbox
│ ├ *exec.routerOutputOp
│ │ └ *exec.HashRouter
*exec.CancelChecker
*distsqlrun.colBatchScan
│ └ *colrpc.Inbox
*exec.UnorderedSynchronizer
*colrpc.Inbox
*colrpc.Inbox
*colrpc.Inbox
*exec.routerOutputOp
│ └ *exec.HashRouter
│ │ *exec.CancelChecker
│ │ *distsqlrun.colBatchScan
*colrpc.Inbox
Node 5
*colrpc.Outbox
*exec.deselectorOp
*exec.countOp
*exec.simpleProjectOp
*exec.hashJoinEqOp
*exec.UnorderedSynchronizer
│ ├ *colrpc.Inbox
│ ├ *colrpc.Inbox
│ ├ *colrpc.Inbox
│ ├ *colrpc.Inbox
│ └ *exec.routerOutputOp
*exec.HashRouter
*exec.CancelChecker
*distsqlrun.colBatchScan
*exec.UnorderedSynchronizer
*colrpc.Inbox
*colrpc.Inbox
*colrpc.Inbox
*colrpc.Inbox
*exec.routerOutputOp
*exec.HashRouter
*exec.CancelChecker
*distsqlrun.colBatchScan
Loading