Skip to content

Commit

Permalink
Merge #56817
Browse files Browse the repository at this point in the history
56817: sql: set "output tuples" stat in row execution r=RaduBerinde a=RaduBerinde

This change makes all the rowexec processors emit the output tuple
count stat.

Release note: None

Co-authored-by: Radu Berinde <[email protected]>
  • Loading branch information
craig[bot] and RaduBerinde committed Nov 18, 2020
2 parents 897b99f + fb29463 commit 42ba666
Show file tree
Hide file tree
Showing 20 changed files with 49 additions and 16 deletions.
11 changes: 10 additions & 1 deletion pkg/sql/colexec/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,15 @@ func (bic *batchInfoCollector) getElapsedTime() time.Duration {
// (with 'idTagKey' distinguishing between the two). 'ioReader' is a component
// (either an operator or a wrapped processor) that performs IO reads that is
// present in the chain of operators rooted at 'op'.
//
// If omitNumTuples is set, the Output.NumTuples stat will not be set. This is
// used for operators that wrap row processors which already emit the same stat.
func NewVectorizedStatsCollector(
op colexecbase.Operator,
ioReader execinfra.IOReader,
id int32,
idTagKey string,
omitNumTuples bool,
inputWatch *timeutil.StopWatch,
memMonitors []*mon.BytesMonitor,
diskMonitors []*mon.BytesMonitor,
Expand All @@ -139,6 +143,7 @@ func NewVectorizedStatsCollector(
return &vectorizedStatsCollectorImpl{
batchInfoCollector: makeBatchInfoCollector(op, id, inputWatch, inputStatsCollectors),
idTagKey: idTagKey,
omitNumTuples: omitNumTuples,
ioReader: ioReader,
memMonitors: memMonitors,
diskMonitors: diskMonitors,
Expand All @@ -153,6 +158,8 @@ type vectorizedStatsCollectorImpl struct {
// idTagKey is the span tag key that will be set to ComponentID.
idTagKey string

omitNumTuples bool

ioReader execinfra.IOReader
memMonitors []*mon.BytesMonitor
diskMonitors []*mon.BytesMonitor
Expand Down Expand Up @@ -199,7 +206,9 @@ func (vsc *vectorizedStatsCollectorImpl) finish() *execstatspb.ComponentStats {
}

s.Output.NumBatches.Set(numBatches)
s.Output.NumTuples.Set(numTuples)
if !vsc.omitNumTuples {
s.Output.NumTuples.Set(numTuples)
}
return s
}

Expand Down
10 changes: 5 additions & 5 deletions pkg/sql/colexec/stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestNumBatches(t *testing.T) {
nBatches := 10
noop := NewNoop(makeFiniteChunksSourceWithBatchSize(nBatches, coldata.BatchSize()))
vsc := NewVectorizedStatsCollector(
noop, nil /* ioReader */, 0 /* id */, execinfrapb.ProcessorIDTagKey,
noop, nil /* ioReader */, 0 /* id */, execinfrapb.ProcessorIDTagKey, false, /* omitNumTuples */
timeutil.NewStopWatch(), nil /* memMonitors */, nil, /* diskMonitors */
nil, /* inputStatsCollectors */
)
Expand All @@ -57,7 +57,7 @@ func TestNumTuples(t *testing.T) {
for _, batchSize := range []int{1, 16, 1024} {
noop := NewNoop(makeFiniteChunksSourceWithBatchSize(nBatches, batchSize))
vsc := NewVectorizedStatsCollector(
noop, nil /* ioReader */, 0 /* id */, execinfrapb.ProcessorIDTagKey,
noop, nil /* ioReader */, 0 /* id */, execinfrapb.ProcessorIDTagKey, false, /* omitNumTuples */
timeutil.NewStopWatch(), nil /* memMonitors */, nil, /* diskMonitors */
nil, /* inputStatsCollectors */
)
Expand Down Expand Up @@ -90,7 +90,7 @@ func TestVectorizedStatsCollector(t *testing.T) {
timeSource: timeSource,
}
leftInput := NewVectorizedStatsCollector(
leftSource, nil /* ioReader */, 0 /* id */, execinfrapb.ProcessorIDTagKey,
leftSource, nil /* ioReader */, 0 /* id */, execinfrapb.ProcessorIDTagKey, false, /* omitNumTuples */
timeutil.NewTestStopWatch(timeSource.Now), nil /* memMonitors */, nil, /* diskMonitors */
nil, /* inputStatsCollectors */
)
Expand All @@ -99,7 +99,7 @@ func TestVectorizedStatsCollector(t *testing.T) {
timeSource: timeSource,
}
rightInput := NewVectorizedStatsCollector(
rightSource, nil /* ioReader */, 1 /* id */, execinfrapb.ProcessorIDTagKey,
rightSource, nil /* ioReader */, 1 /* id */, execinfrapb.ProcessorIDTagKey, false, /* omitNumTuples */
timeutil.NewTestStopWatch(timeSource.Now), nil /* memMonitors */, nil, /* diskMonitors */
nil, /* inputStatsCollectors */
)
Expand All @@ -120,7 +120,7 @@ func TestVectorizedStatsCollector(t *testing.T) {
}

mjStatsCollector := NewVectorizedStatsCollector(
timeAdvancingMergeJoiner, nil /* ioReader */, 2 /* id */, execinfrapb.ProcessorIDTagKey,
timeAdvancingMergeJoiner, nil /* ioReader */, 2 /* id */, execinfrapb.ProcessorIDTagKey, false, /* omitNumTuples */
mjInputWatch, nil /* memMonitors */, nil, /* diskMonitors */
[]ChildStatsCollector{leftInput.(ChildStatsCollector), rightInput.(ChildStatsCollector)},
)
Expand Down
13 changes: 9 additions & 4 deletions pkg/sql/colflow/vectorized_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ func (s *vectorizedFlowCreator) wrapWithVectorizedStatsCollectorBase(
inputs []colexecbase.Operator,
id int32,
idTagKey string,
omitNumTuples bool,
monitors []*mon.BytesMonitor,
) (colexec.VectorizedStatsCollector, error) {
inputWatch := timeutil.NewStopWatch()
Expand All @@ -366,7 +367,7 @@ func (s *vectorizedFlowCreator) wrapWithVectorizedStatsCollectorBase(
inputStatsCollectors[i] = sc
}
vsc := colexec.NewVectorizedStatsCollector(
op, ioReader, id, idTagKey, inputWatch,
op, ioReader, id, idTagKey, omitNumTuples, inputWatch,
memMonitors, diskMonitors, inputStatsCollectors,
)
s.vectorizedStatsCollectorsQueue = append(s.vectorizedStatsCollectorsQueue, vsc)
Expand Down Expand Up @@ -772,7 +773,7 @@ func (s *vectorizedFlowCreator) setupRouter(
var err error
localOp, err = s.wrapWithVectorizedStatsCollectorBase(
op, nil /* ioReader */, nil, /* inputs */
int32(stream.StreamID), execinfrapb.StreamIDTagKey, mons,
int32(stream.StreamID), execinfrapb.StreamIDTagKey, false /* omitNumTuples */, mons,
)
if err != nil {
return err
Expand Down Expand Up @@ -911,7 +912,7 @@ func (s *vectorizedFlowCreator) setupInput(
var err error
op, err = s.wrapWithVectorizedStatsCollectorBase(
op, nil /* ioReader */, statsInputsAsOps, -1, /* id */
"" /* idTagKey */, nil, /* monitors */
"" /* idTagKey */, false /* omitNumTuples */, nil, /* monitors */
)
if err != nil {
return nil, nil, nil, err
Expand Down Expand Up @@ -1120,6 +1121,7 @@ func (s *vectorizedFlowCreator) setupFlow(
err = errors.Wrapf(err, "unable to vectorize execution plan")
return
}
originalOp := result.Op
if flowCtx.Cfg != nil && flowCtx.Cfg.TestingKnobs.EnableVectorizedInvariantsChecker {
result.Op = colexec.NewInvariantsChecker(result.Op)
}
Expand Down Expand Up @@ -1147,9 +1149,12 @@ func (s *vectorizedFlowCreator) setupFlow(

op := result.Op
if s.recordingStats {
// We prevent emitting the NumTuples stat from Columnarizers because the
// wrapped processor already emits the same stat.
_, isColumnarizer := originalOp.(*colexec.Columnarizer)
op, err = s.wrapWithVectorizedStatsCollectorBase(
op, result.IOReader, inputs, pspec.ProcessorID,
execinfrapb.ProcessorIDTagKey, result.OpMonitors,
execinfrapb.ProcessorIDTagKey, isColumnarizer, result.OpMonitors,
)
if err != nil {
return
Expand Down
7 changes: 7 additions & 0 deletions pkg/sql/execinfra/processorsbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,13 @@ func (h *ProcOutputHelper) consumerClosed() {
h.rowIdx = h.maxRowIdx
}

// Stats returns output statistics.
func (h *ProcOutputHelper) Stats() execstatspb.OutputStats {
return execstatspb.OutputStats{
NumTuples: execstatspb.MakeIntValue(h.rowIdx),
}
}

// ProcessorConstructor is a function that creates a Processor. It is
// abstracted away so that we could create mixed flows (i.e. a vectorized flow
// with wrapped processors) without bringing a dependency on sql/rowexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ https://cockroachdb.github.io/distsqlplan/decode.html#eJyUkF9LwzAUxd_9FOE-dRBY42
query T
SELECT url FROM [EXPLAIN ANALYZE (DISTSQL) SELECT avg(k) OVER () FROM kv]
----
https://cockroachdb.github.io/distsqlplan/decode.html#eJzclEtv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cMVt-hMNUZUt67dq51a5CQWQrCk0p_bvxvJrBBas6RN8f7GqQmmBGsUeUrJ-pAJfZSHUDWpvuI8_uvjYOwn6W9wa3Dm1jIwMtxFjeZbtViLntyTHXOk7wrNMpdyiYMR38HXOpLouARHSLB_eOChF7YO3mFZWqmLX5WEZn6pZuFezoPtMBM_PhBcOvOjIpiLsThh2IIwGXnxkhFF3wqgDYTxw839MhHF3wrgD4XBwZHzPbOY5mlIVBg822OMv-_VmQ3GNzRo0qtIpnmmVOpvmOHM6FxBobJMNmsOkcCn3wV1x8E_x_3ti_1AcvsTZoTgqKNDeKL0kN1za3SYJNKglz-RvfrgJN5JtE1OUK2wbuUluurnJvayj-2zRK2aLXzHb8DWxJev__gQAAP__ZtlhpA==

# Very simple query to make it easier to spot regressions when rewriting results
# in test files.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SELECT k FROM geo_table WHERE ST_Intersects('SRID=26918;POINT(400003 4000003)'::
query T
SELECT url FROM [EXPLAIN ANALYZE SELECT k FROM geo_table WHERE ST_Intersects('SRID=26918;POINT(400003 4000003)'::geometry, geom) ORDER BY k]
----
https://cockroachdb.github.io/distsqlplan/decode.html#eJy0lN9v0zAQx9_5K073slUE1U5C6YyQ2m4ZFLp2pBUwlmrykmOLlsbFdlGnqf87StKNbqgZfSAPju7H17n72Jc7ND8zFDgOBsHhBBY6g-NwdALnwbfTQbc_hO6wOzj7HsD-UX88GX8eNGCdelMlXpG6sPIyI_j6IQgDMPYizS1pQ7E1-3vjsH_0zm0d8Pbb01F_ONn3GWPMg_LFvMaeEO-D0UkwCc-cYq9ZA0bhURBC7wxupuhgrhIayhkZFOfIcergXKuYjFG6cN2VCf1kiYI5mObzhS3cUwdjpQnFHdrUZoQCJ0WRIcmEdJOhgwlZmWbltg89dIoKLtI8oSU6OJ7L3AhoRtiLouWPJIqWnEXRkj234KtdNTxCkHkCHgNlr0kbdPDTF7DpjASwe2sxz8iAJpkI8Cvf5a19cHku9HC6clAt7B8OxsorQsFXzr-z6ue_SFtKjtPMkibd5I-B3ceD5VyDyqHDBZiCFhgrtRVl996b11HEXBZFjD23IFCe7CoroP1FbbSwAjpFvWWDa2gVr8pjrMyyTbQzuYQZzZS-BZllKpaWEgEMeuuYibW08TUkqbl5mrENt7sL7o8qzdc30912M-c6nUl9iw5WhyKeThrjjBcz5TK31Tpgm89hq8vbPq-MNmvztu8HPt8Tm8PXcRs1-Nzt-OrvqbsVkbcLorHSlnTTe4ynw1_uUun_OGh_ly5CMnOVG3rUxbad2WrqICVXVP3njFromE61isvPVOao1JWOhIytorwy-nkVKgrcFPNasVsvdmvFXr3YqxX7T8TT1YvfAQAA__-jkBRR
https://cockroachdb.github.io/distsqlplan/decode.html#eJy8lN1u2koQx-_PU4zmJkHHR-zaPpRsVQmSOC0tgdSgtmmMoo09TawYr7u7VEQR717ZJhFJBKlvysWi-fgvM7-Z5R7NzwwFToJhcDSFhc7gJByfwkXw7WzYH4ygP-oPz78HsH88mEwnn4ctWKfe1onXpC6tvMoIvn4IwgCMvUxzS9pQbM3-3iQcHL9zOwe8-_ZsPBhN933GGPOg-mJea0-I98H4NJiG505517wF4_A4COHwHG5n6GCuEhrJORkUF8hx5mChVUzGKF267quEQbJEwRxM82JhS_fMwVhpQnGPNrUZocBpWWRIMiHdZuhgQlamWXXtYw-9soLLNE9oiQ5OCpkbAe0ID6No-SOJoiVnUbRkrx34X1MNjxBknoDHQNkb0gYd_PQFbDonAezBWhQZGdAkEwF-7bu6s48uz4VDdHCdpha2WNgycbZysLbWaIyV14SCr5w_xzfIf5G2lJykmSVNus2fMnyIB8tCg8qhxwWYEiAYK7UVFRDvzf9RxFwWRYy9diBQnjSVlRxfgByXGHplvVWDa441wtpjrMyyTdpzuYQ5zZW-A5llKpaWEgGs4lvGTKyljW8gSc3ty4xnE3C3TsBtMoGPKs3X--tu299Cp3Op79DBek7i-XtknPHy5bnM7XQO2ObnqNPnXZ_XRpd1edf3A5_vic0n2nNbO4i624nu3ma3CTWvCbWJ0pZ023tKrMf_bVL8X1oHv0ljIZlC5YaeNLbtZraaOUjJNdX_mUYtdExnWsXVz9TmuNJVjoSMraO8NgZ5HSoL3BTznWJ3t9jdKfZ2i72dYv-ZeLb653cAAAD__7nvLfs=

statement ok
DROP TABLE geo_table
Expand Down Expand Up @@ -64,7 +64,7 @@ SELECT k FROM geo_table WHERE ST_Intersects('SRID=26918;POINT(400003 4000003)'::
query T
SELECT url FROM [EXPLAIN ANALYZE SELECT k FROM geo_table WHERE ST_Intersects('SRID=26918;POINT(400003 4000003)'::geometry, geom) ORDER BY k]
----
https://cockroachdb.github.io/distsqlplan/decode.html#eJzElF9v2jwUxu_fT3F0blr0ZsJOGKOeJgFturFR6ALa1jWocuOzNmqImW0mqorvPiWhHe0EHbsZF0bnz2PO87PNHdrvGQochf3wcAxzk8FxNDyB8_DLab_TG0Bn0OmffQ1h_6g3Go8-9muwar2pGq9IXzh5mRF8fhdGIVh3keaOjKXE2f29UdQ7euM3D3jr9emwNxjvNxhjLIDyiwW1PSHehsOTcBydecVe0xoMo6Mwgu4Z3EzQw1wrGsgpWRTnyHHi4czohKzVpkjdlQ09tUDBPEzz2dwV6YmHiTaE4g5d6jJCgeNiyIikIlNn6KEiJ9Os3PbBQ7uY4CLNFS3Qw9FM5lZAPcZuHC--qThesKBY2DMLvthVw2MEmSsIGGh3Tcaihx8-gUunJIDdR_NZRhYMSSXAr3KXt-4hxZvQxcnSQz13vzhYJ68IBV96f86ql_8g40gdp5kjQ6bOHwO7r4eLmQGdQ5sLsAUtsE4aJ0r3wauXccwK96wwuXVBoFztKiug_UZtOHcC2sW8pcEVtIpXlbFOZtk62qlcwJSm2tyCzDKdSEdKAIPuqmYTI11yDSq1N087NuH2d8H9Xqf56mb6m27mzKRTaW7Rw-pQxNOXxjjjxZvymd9sHrD1z2Gzw1sNXgUt1uKtRiNs8D2x_vjafu3v8D13TzchCnZBNNLGkakHj_G0-f__-qAbu7iIyM50bumRi007s-XEQ1JXVP3PWT03CZ0anZQ_U4XDUlcmFFlXVXkV9PKqVAy4LuZbxf52sb9VHGwXB1vFjSfiyfK_nwEAAP__uYcUVQ==
https://cockroachdb.github.io/distsqlplan/decode.html#eJzMlN9P2zoUx9_vX3F0XqC6uaqd9HbF06QWCFu30rK02sZIhUxyBhFpnNnuVIT6v09OCiogCt3T8uDo_Pg653x8nFs0P3MUOA4H4cEE5jqHo2h0DGfht5NBrz-E3rA3OP0ewu5hfzwZfx40YJV6XSdekjq38iIn-PohjEIw9jwrLGlDiTW7O-Oof_jOb-_xztuTUX842W0xxlgA1YsFjR0h3oej43ASnXpur1kDRtFhGMH-KVxP0cNCpTSUMzIozpDj1MNSq4SMUdq5bquEfrpAwTzMinJunXvqYaI0obhFm9mcUODEFRmRTEk3GXqYkpVZXm1730PXVXCeFSkt0MNxKQsjoBnjfhwvfqRxvGCBW9gLC_63rYbHCLJIIWCg7BVpgx5--gI2m5EAdmfNy5wMaJKpAL_2XdzYexdvwz56uEpTc1vOrUucLj2srRUaY-UloeBL7_X4-sUv0pbSoyy3pEk3-UOGd_FwUWpQBXS5AOMAgrFSW1EBCd78H8fMAWGu740LAhXptjLH8QnIkcPQdfVWDa441ghrj7Eyz9dpz-QCZjRT-gZknqtEWkoFsIqvi5lES5tcQZqZ66cZrz4Bf5sT-KiyYjW__nPzW-psJvUNelifk3h8Hxln3N08n_nt9h5bfw7aPd5p8drosA7vtFphi--I9Sva9Rt_RvTlaX41tWAbamOlLelm8JBYl__7F45Da5vGIjKlKgw9aOy5ndly6iGll1T_M42a64ROtEqqz9TmqNJVjpSMraO8NvpFHXIFrov5RrG_WexvFAebxcFGceuReLr853cAAAD__8cGLf0=

# Also works when creating an index.
statement ok
Expand All @@ -76,4 +76,4 @@ CREATE INVERTED INDEX geom_index ON geo_table(geom)
query T
SELECT url FROM [EXPLAIN ANALYZE SELECT k FROM geo_table WHERE ST_Intersects('SRID=26918;POINT(400003 4000003)'::geometry, geom) ORDER BY k]
----
https://cockroachdb.github.io/distsqlplan/decode.html#eJzElF9v2jwUxu_fT3F0blr0ZsJOGKOeJgFturFR6ALa1jWocuOzNmqImW0mqorvPiWhHe0EHbsZF0bnz2PO87PNHdrvGQochf3wcAxzk8FxNDyB8_DLab_TG0Bn0OmffQ1h_6g3Go8-9muwar2pGq9IXzh5mRF8fhdGIVh3keaOjKXE2f29UdQ7euM3D3jr9emwNxjvNxhjLIDyiwW1PSHehsOTcBydecVe0xoMo6Mwgu4Z3EzQw1wrGsgpWRTnyHHi4czohKzVpkjdlQ09tUDBPEzz2dwV6YmHiTaE4g5d6jJCgeNiyIikIlNn6KEiJ9Os3PbBQ7uY4CLNFS3Qw9FM5lZAPcZuHC--qThesKBY2DMLvthVw2MEmSsIGGh3Tcaihx8-gUunJIDdR_NZRhYMSSXAr3KXt-4hxZvQxcnSQz13vzhYJ68IBV96f86ql_8g40gdp5kjQ6bOHwO7r4eLmQGdQ5sLsAUtsE4aJ0r3wauXccwK96wwuXVBoFztKiug_UZtOHcC2sW8pcEVtIpXlbFOZtk62qlcwJSm2tyCzDKdSEdKAIPuqmYTI11yDSq1N087NuH2d8H9Xqf56mb6m27mzKRTaW7Rw-pQxNOXxjjjxZvymd9sHrD1z2Gzw1sNXgUt1uKtRiNs8D2x_vjafu3v8D13TzchCnZBNNLGkakHj_G0-f__-qAbu7iIyM50bumRi007s-XEQ1JXVP3PWT03CZ0anZQ_U4XDUlcmFFlXVXkV9PKqVAy4LuZbxf52sb9VHGwXB1vFjSfiyfK_nwEAAP__uYcUVQ==
https://cockroachdb.github.io/distsqlplan/decode.html#eJzMlN9P2zoUx9_vX3F0XqC6uaqd9HbF06QWCFu30rK02sZIhUxyBhFpnNnuVIT6v09OCiogCt3T8uDo_Pg653x8nFs0P3MUOA4H4cEE5jqHo2h0DGfht5NBrz-E3rA3OP0ewu5hfzwZfx40YJV6XSdekjq38iIn-PohjEIw9jwrLGlDiTW7O-Oof_jOb-_xztuTUX842W0xxlgA1YsFjR0h3oej43ASnXpur1kDRtFhGMH-KVxP0cNCpTSUMzIozpDj1MNSq4SMUdq5bquEfrpAwTzMinJunXvqYaI0obhFm9mcUODEFRmRTEk3GXqYkpVZXm1730PXVXCeFSkt0MNxKQsjoBnjfhwvfqRxvGCBW9gLC_63rYbHCLJIIWCg7BVpgx5--gI2m5EAdmfNy5wMaJKpAL_2XdzYexdvwz56uEpTc1vOrUucLj2srRUaY-UloeBL7_X4-sUv0pbSoyy3pEk3-UOGd_FwUWpQBXS5AOMAgrFSW1EBCd78H8fMAWGu740LAhXptjLH8QnIkcPQdfVWDa441ghrj7Eyz9dpz-QCZjRT-gZknqtEWkoFsIqvi5lES5tcQZqZ66cZrz4Bf5sT-KiyYjW__nPzW-psJvUNelifk3h8Hxln3N08n_nt9h5bfw7aPd5p8drosA7vtFphi--I9Sva9Rt_RvTlaX41tWAbamOlLelm8JBYl__7F45Da5vGIjKlKgw9aOy5ndly6iGll1T_M42a64ROtEqqz9TmqNJVjpSMraO8NvpFHXIFrov5RrG_WexvFAebxcFGceuReLr853cAAAD__8cGLf0=
2 changes: 1 addition & 1 deletion pkg/sql/logictest/testdata/logic_test/vectorize_local
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ https://cockroachdb.github.io/distsqlplan/decode.html#eJyMkEFL60AUhffvV1zO6j2Yh4
query T
SELECT url FROM [EXPLAIN ANALYZE SELECT c.a FROM c JOIN d ON d.b = c.b]
----
https://cockroachdb.github.io/distsqlplan/decode.html#eJykUl2LEzEUffdXXO6TQqydPvgQEFq1wqzjzNoWUZd5yCSXdXSaxHzALmX-u8wkyu5CRdnHe3LOufccckL_c0CO-221fXOA6AZ4t2s-wNX282W1KWvY1Jvqy9ctPH1b7g_7j9UzyFS5EIkq4aIpa1DQ1KAWHbwCuehaZKiNolocySO_wgJbhtYZSd4bN0GnmVCqG-RLhr22MUxwy1AaR8hPGPowEHI8iG6gHQlF7sUSGSoKoh9mW7n2JJHh3grtOTxHhk0MHNYFW6-Q4ftPEPojcVj6PEU7kAdHQnHIjO42_IGKl_AaGXYiyG_kwcRgJ79pbZb-hlbYjgzTlA_3QVwT8mJk_x7uwvQ6ZyvuZ1Nr6_qjcLfIsDLmR7Tw3fQajOYwh8tJMS_I2VKshPgghuFhA-f7mKzohmQMvdF3iY-qY_U_dezIW6M93avinPNybBmSuqb0n7yJTtKlM3Jek8Zm1s2AIh_Sa5GGUqen6cC74uKv4tUDcTs--RUAAP__htoKkw==
https://cockroachdb.github.io/distsqlplan/decode.html#eJyUkkGP0zAQhe_8itE7gWRK0wMHS0gtUKQuIVnaCgGrHBx7tATSONiOtKuq_x0lNmh3oQiO8zxvZr4nH-G_t5DYrfP1qz0NrqU32_IdXa0_XuarTUGrYpV_-rymx683u_3uff6EUqueqdiq6aLcFGSoLMjManpBelZXEOis4UId2ENeIUMl0Dur2XvrRuk4NWzMDeRcoOn6IYxyJaCtY8gjQhNahsRe1S1vWRl2z-YQMBxU005j9dKzhsCuV52X9BQC5RAkLTOxXEDg7QcKzYElzX2qhr5lT46VkZQ66tvwS8qe00sI1CroL-zJDqEf541rk_WntEB1EohVOtwHdc2Q2Un8O9yFbbrElt1nM8veNQflbiGQW_tt6OmrbTqynaQJLpEiLUhsESsqPqi2fZjA-TyyP1EK8A3rITS2u-v9PaFzcSz-J44t-952nu9FcW7y_FQJsLnm-J-8HZzmS2f1tCaW5eSbBMM-xNcsFpsuPo0H3jVnfzUvHpir06MfAQAA__-JZQqT

query T
SELECT url FROM [EXPLAIN ANALYZE SELECT c.a FROM c INNER MERGE JOIN d ON c.a = d.b]
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/opt/exec/execbuilder/testdata/distsql_misc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ FROM generate_series(1,10) AS a, generate_series(1,10) AS b, generate_series(1,1
query T
SELECT url FROM [EXPLAIN ANALYZE (DISTSQL) CREATE STATISTICS s1 ON a FROM data]
----
https://cockroachdb.github.io/distsqlplan/decode.html#eJzElUFv2k4Qxe__T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CFCLeKksim9L3IZr4S8Bwp-LlLlkY7FiEgjwkimv6EECrNCe-SiDHX1ieh4hR6x1eZU5AkqIlFEHmG2XU9v7_Wf4cC2yVugsLmZFTovf1feDdcU6vMmu9JiieCxNTXfzxerPEFp9XZ3q8d-_AsrryqZr0W9yCFjftD4r1-RZjJCidGOX7g-GG24XEpcCp1Ji9nmIckJt21yWyzuUKvTg5GdncjMvAvMpAsW61j8mW3g-9rAun1yFe_pAzfuQ8uO2z70j94Hbg6XG8HlHct5ZXBbdtzCPTs6XMccrmME1-lY7iuD27LjFu7g6HBdc7iuEVy3Y_WeCdfZB5d3nf1wHWO4LTtu4Z7_12dij_EcVZ6lCh89F_v_bJfPCEZLrN8clRVygdcyW1Q29XFW6apBhErXX1l9GKf1pzLgv2LWKOY7YvZYzJudW6ydRrXbLHafkruiWAGFFPWPTN5tOqYwLavU5VXHwscmvUaTfnPC_kskPGs0GTQnHLxEwvPmjtgt9Wwu99Myut2zTcZw_eZ3AAAA___Jb7lC

query T
SELECT url FROM [EXPLAIN (DISTSQL, TYPES) SELECT * FROM data]
Expand Down
1 change: 1 addition & 0 deletions pkg/sql/rowexec/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ func (ag *aggregatorBase) execStatsForTrace() *execstatspb.ComponentStats {
Exec: execstatspb.ExecStats{
MaxAllocatedMem: execstatspb.MakeIntValue(uint64(ag.MemMonitor.MaximumBytes())),
},
Output: ag.Out.Stats(),
}
}

Expand Down
1 change: 1 addition & 0 deletions pkg/sql/rowexec/countrows.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,6 @@ func (ag *countAggregator) execStatsForTrace() *execstatspb.ComponentStats {
}
return &execstatspb.ComponentStats{
Inputs: []execstatspb.InputStats{is},
Output: ag.Out.Stats(),
}
}
1 change: 1 addition & 0 deletions pkg/sql/rowexec/distinct.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ func (d *distinct) execStatsForTrace() *execstatspb.ComponentStats {
Exec: execstatspb.ExecStats{
MaxAllocatedMem: execstatspb.MakeIntValue(uint64(d.MemMonitor.MaximumBytes())),
},
Output: d.Out.Stats(),
}
}

Expand Down
1 change: 1 addition & 0 deletions pkg/sql/rowexec/hashjoiner.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ func (h *hashJoiner) execStatsForTrace() *execstatspb.ComponentStats {
MaxAllocatedMem: execstatspb.MakeIntValue(uint64(h.MemMonitor.MaximumBytes())),
MaxAllocatedDisk: execstatspb.MakeIntValue(uint64(h.diskMonitor.MaximumBytes())),
},
Output: h.Out.Stats(),
}
}

Expand Down
1 change: 1 addition & 0 deletions pkg/sql/rowexec/inverted_filterer.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ func (ifr *invertedFilterer) execStatsForTrace() *execstatspb.ComponentStats {
MaxAllocatedMem: execstatspb.MakeIntValue(uint64(ifr.MemMonitor.MaximumBytes())),
MaxAllocatedDisk: execstatspb.MakeIntValue(uint64(ifr.diskMonitor.MaximumBytes())),
},
Output: ifr.Out.Stats(),
}
}

Expand Down
1 change: 1 addition & 0 deletions pkg/sql/rowexec/inverted_joiner.go
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ func (ij *invertedJoiner) execStatsForTrace() *execstatspb.ComponentStats {
MaxAllocatedMem: execstatspb.MakeIntValue(uint64(ij.MemMonitor.MaximumBytes())),
MaxAllocatedDisk: execstatspb.MakeIntValue(uint64(ij.diskMonitor.MaximumBytes())),
},
Output: ij.Out.Stats(),
}
}

Expand Down
1 change: 1 addition & 0 deletions pkg/sql/rowexec/joinreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@ func (jr *joinReader) execStatsForTrace() *execstatspb.ComponentStats {
TuplesRead: fis.NumTuples,
KVTime: fis.WaitTime,
},
Output: jr.Out.Stats(),
}
}

Expand Down
1 change: 1 addition & 0 deletions pkg/sql/rowexec/mergejoiner.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ func (m *mergeJoiner) execStatsForTrace() *execstatspb.ComponentStats {
Exec: execstatspb.ExecStats{
MaxAllocatedMem: execstatspb.MakeIntValue(uint64(m.MemMonitor.MaximumBytes())),
},
Output: m.Out.Stats(),
}
}

Expand Down
Loading

0 comments on commit 42ba666

Please sign in to comment.