Skip to content

Commit

Permalink
sql: directly specify columns in TableReader
Browse files Browse the repository at this point in the history
The internal columns of the TableReader (as well as the row fetcher)
are all the columns of the table, with only a subset of values
actually produced. This design decision has been carried over way past
the point where it makes sense (I admit, it's questionable whether it
ever made sense). For one, "all the columns" is ambiguous (does it
contain non-public columns? does it include system columns?) leading
to various flags and inherent fragility. Second, it relies on the
execution engine to figure out (based on the PostProcessSpec) which
columns are actually needed, which the optimizer already figures out
for us now.

This commit changes the TableReader spec and the interface of
row.Fetcher to always produce a given specific set of column IDs. The
diagram for table readers now specifies the columns by name.

The JoinReader, InvertedJoiner, ZigzagJoiner are not changed in this
commit (but they should be cleaned up as well).

Release note (sql change): The distributed plan diagram now lists
scanned column names for TableReaders.
  • Loading branch information
RaduBerinde committed Jan 20, 2022
1 parent 96779a6 commit 059d5d8
Show file tree
Hide file tree
Showing 76 changed files with 1,052 additions and 948 deletions.
1 change: 0 additions & 1 deletion pkg/ccl/changefeedccl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ go_library(
"//pkg/sql/sem/tree",
"//pkg/sql/sessiondatapb",
"//pkg/sql/types",
"//pkg/util",
"//pkg/util/bitarray",
"//pkg/util/bufalloc",
"//pkg/util/cache",
Expand Down
14 changes: 2 additions & 12 deletions pkg/ccl/changefeedccl/rowfetcher_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"github.com/cockroachdb/cockroach/pkg/sql/row"
"github.com/cockroachdb/cockroach/pkg/sql/rowenc"
"github.com/cockroachdb/cockroach/pkg/sql/sem/tree"
"github.com/cockroachdb/cockroach/pkg/util"
"github.com/cockroachdb/cockroach/pkg/util/cache"
"github.com/cockroachdb/cockroach/pkg/util/encoding"
"github.com/cockroachdb/cockroach/pkg/util/hlc"
Expand Down Expand Up @@ -155,22 +154,13 @@ func (c *rowFetcherCache) RowFetcherForTableDesc(
}

// TODO(dan): Allow for decoding a subset of the columns.
var colIdxMap catalog.TableColMap
var valNeededForCol util.FastIntSet
for _, col := range tableDesc.PublicColumns() {
colIdxMap.Set(col.GetID(), col.Ordinal())
valNeededForCol.Add(col.Ordinal())
}

var rf row.Fetcher
rfArgs := row.FetcherTableArgs{
Desc: tableDesc,
Index: tableDesc.GetPrimaryIndex(),
ColIdxMap: colIdxMap,
IsSecondaryIndex: false,
Cols: tableDesc.PublicColumns(),
ValNeededForCol: valNeededForCol,
Columns: tableDesc.PublicColumns(),
}
var rf row.Fetcher
if err := rf.Init(
context.TODO(),
c.codec,
Expand Down
1 change: 0 additions & 1 deletion pkg/ccl/cliccl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ go_library(
"//pkg/sql/sem/tree",
"//pkg/storage",
"//pkg/storage/enginepb",
"//pkg/util",
"//pkg/util/envutil",
"//pkg/util/hlc",
"//pkg/util/humanizeutil",
Expand Down
12 changes: 1 addition & 11 deletions pkg/ccl/cliccl/debug_backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ import (
"github.com/cockroachdb/cockroach/pkg/sql/row"
"github.com/cockroachdb/cockroach/pkg/sql/sem/tree"
"github.com/cockroachdb/cockroach/pkg/storage"
"github.com/cockroachdb/cockroach/pkg/util"
"github.com/cockroachdb/cockroach/pkg/util/hlc"
"github.com/cockroachdb/cockroach/pkg/util/humanizeutil"
"github.com/cockroachdb/cockroach/pkg/util/timeutil"
Expand Down Expand Up @@ -564,33 +563,24 @@ func makeIters(
func makeRowFetcher(
ctx context.Context, entry backupccl.BackupTableEntry, codec keys.SQLCodec,
) (row.Fetcher, error) {
var colIdxMap catalog.TableColMap
var valNeededForCol util.FastIntSet
colDescs := make([]catalog.Column, len(entry.Desc.PublicColumns()))
for i, col := range entry.Desc.PublicColumns() {
colIdxMap.Set(col.GetID(), i)
valNeededForCol.Add(i)
colDescs[i] = col
}

if debugBackupArgs.withRevisions {
newIndex := len(entry.Desc.PublicColumns())
newCol, err := entry.Desc.FindColumnWithName(colinfo.MVCCTimestampColumnName)
if err != nil {
return row.Fetcher{}, errors.Wrapf(err, "get mvcc timestamp column")
}
colIdxMap.Set(newCol.GetID(), newIndex)
valNeededForCol.Add(newIndex)
colDescs = append(colDescs, newCol)
}

table := row.FetcherTableArgs{
Desc: entry.Desc,
Index: entry.Desc.GetPrimaryIndex(),
ColIdxMap: colIdxMap,
IsSecondaryIndex: false,
Cols: colDescs,
ValNeededForCol: valNeededForCol,
Columns: colDescs,
}

var rf row.Fetcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ vectorized: true
table: orders@orders_pkey
spans: [/'ap-southeast-2'/'94e4b847-8f2f-4ac5-83f1-641d6e3df727' - /'ap-southeast-2'/'94e4b847-8f2f-4ac5-83f1-641d6e3df727'] [/'us-east-1'/'94e4b847-8f2f-4ac5-83f1-641d6e3df727' - /'us-east-1'/'94e4b847-8f2f-4ac5-83f1-641d6e3df727']
·
Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykUttO20AQfe9XjOaFizZKfIEES0hGbUqD0oQmVK3UtZDxjmHbZNfdXauuUJ76bf2vyjYUghoE9MHWzuXMnHM012i_LzDC4efT8dFoAttvRvOz-YfxDsyH4-HrM9BGkDmXgkFh9FLfvGRGcDRvH-c_pLvSpTtvGm6ruyCkzXSp3Hpj2wVvZ9P37WwLJ9PRpJ1u4eN8NDmG7dtdO_Dp3XA2_MsCDmHrIKTwYhD2O4Pczzthmu11BkHudfZDT-xTIPK-399ChkoLmqRLshh9wRAThoXRGVmrTZ26bhpGosKox1CqonR1OmGYaUMYXaOTbkEY4Vl6saAZpYJMt4cMBblULpqxrYK4MHKZmp_IcF6kykbQ5Rhz7HLkvDoIOa-o_l0MjjmvBnn35PcvzqvcE5xXnlCHddDf4tjtQaoEeKDdFRlkOC1dBLHHYp_FASYrhrp0d0ytSy8JI2_FXqbGe7KamnfvRYqerMLfqOKOvCUj0wWUqqFKYo1_svqH3Inu6KLrrwsdy6V04G2k0nuOoSdaqhs_g_U17U3f83Os9beygK9aKtAqgrgGzEgJMo1BEAcMYr_-duO9jfSC59CbkS20svTAqk3CE4YkLqm13erSZHRqdNasacNpg2sSgqxrq34bjFRTag7yPtj7H7D_KDhYA_cegoNHweEDcLJ69ScAAP__fLWm2w==
Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJyskttO20AQhu_7FKO54aCNEh8gwRKSEU1pUBpoQtVK3QgZ7wS2dXbd3bXqCuWqz9b3qmxDwVGDBO2FrT3MP_N_v_YW7bcMIxx-Oh8fjSaw_Xo0u5i9H-_AbDgeHl-ANoLMpRQMcqOX-m4lU4KjWbO4_C7djS7cZV1wf7sLQtpUF8q1C5sqeDM9e9f0tnB6Npo03S18mI0mJ7B9P2sHPr4dTod_XMAhbB2EFF4Nwn5nsPAXnTBJ9zqDYOF19kNP7FMgFn2_v4UMlRY0SZZkMfqMIc4Z5kanZK021dFtXTASJUY9hlLlhauO5wxTbQijW3TSZYQRXiRXGU0pEWS6PWQoyCUyq9s2BHFu5DIxP5Dhsc6KpbJRKzeZ0kN8yHCWJ1VJl2PMscuR8_Ig5Lyk6nc1OOG8HCy6p79-cl4uPMF56Ql1WG36Wxy7PUiUAA-0uyGD8xVDXbgH-9Yl14SRt2IvQ_T-L2IF03sR5kY0fyPaA5ElI5MMClW7JNGCmq_-ksFEd3Te9dv0Y7mUDryNVnrPSflUS3UXctAe07z-RyGPtf5a5PBFSwVaRRBXgikpQSaC2GMQBwxiv_p2472N9oLn2JuSzbWytBbVJvA5QxLX1MRudWFSOjc6rcc027NaVx8Isq659ZvNSNVX9St9LPb-Rew_KQ5a4t66OHhSHK6J56tXvwMAAP__m3W5aQ==

query T nodeidx=3
USE multi_region_test_db; EXPLAIN (DISTSQL) SELECT
Expand Down Expand Up @@ -337,7 +337,7 @@ vectorized: true
table: orders@orders_pkey
spans: [/'ap-southeast-2'/'94e4b847-8f2f-4ac5-83f1-641d6e3df727' - /'ap-southeast-2'/'94e4b847-8f2f-4ac5-83f1-641d6e3df727'] [/'us-east-1'/'94e4b847-8f2f-4ac5-83f1-641d6e3df727' - /'us-east-1'/'94e4b847-8f2f-4ac5-83f1-641d6e3df727']
·
Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykk99uGjsQxu_PU1hzk9PIhP0XICtFctTSlohCCpFaqUZos55N3IK9tb3tVhFXfba-V7W7JCmooCS9ANvj-Zjf5xluwX5dQAz9jxfDs8GI_P9qML2cvh--INP-sP_ykmgj0MyloCQ3eqntUb2sAzJFcjZtNvPv0t3ows3rhLvbQyKkTXWh3GZik0VeT8bvmhKWnI8Ho3URMr7bHUmVacJ44XkhrjOb2Ie3_Un_Ho-ckoOTCKOrXtRt9bIga0VJetzqhZnf6kS-6GAosm7QPQAKSgscJUu0EH-CCGYUcqNTtFabKnRbJwxECbFHQaq8cFV4RiHVBiG-BSfdAiGGy-RqgRNMBJq2BxQEukQu6p9tSFlu5DIxP4DCNE-UjUmbA-PQ5sB5eRJxXmL1ddV7w3nZy9rnv35yXma-4Lz0hTqtDt0DDm2PJEoQn2h3gwYojAsXE-ZTFlAWwWxFQRfugdS65Boh9lf0eW78R7upuL1nOXq0i2Cniwd4i0YmC1KoGhXFBv9s9Re7I93SeTvYNDqUS-mIvxPFe8qDDtQ3NA7FuZYKTTvcLNXMN2uWeTXScylKoPeyfpkbwjr3w8_CrRcL9z1a-BTSinDd-WgH5V3nh1p_KXLyWUtFtIoJqwTjEWHdTdAJKoGmZiXsmBIWVJ9D1tlJHD2FeII218riVp93dW1GAcU1NjNjdWFSvDA6rcs0x3GtqwMCrWtug-YwUPVV_W_6U-z_izjYKw43xN62ONwrjvaLo73i4y3xbPXf7wAAAP__Xc4AbA==
Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJysk9tu2zgQhu_3KYi5yW5AxzrFdgQEYJD1bh24dmoHaIHSMBRxnLC1SZWkWhWBr_psfa9CkpNUQWUgaS9skTPzc76fhzuwn9YQw_Dd5fhsNCF__zuaX83fjP8h8-F4eH5FtBFollJQkhm90fao-uwCMkVyNq8Hyy_S3ercLauC--whEdKmOleuWVhXkf9m09d1C0supqPJrgmZ3o-OpFppwnjueSHuKuvY21fD2fABj5ySg5MIo-tB1O8MVsGqEyXpcWcQrvxOL_JFD0Ox6gf9A6CgtMBJskEL8XuIYEEhMzpFa7UpQ3dVwUgUEHsUpMpyV4YXFFJtEOI7cNKtEWK4Sq7XOMNEoOl6QEGgS-S6WrYmZZmRm8R8BQrnep1vlI0bGypTpKR0AxTmWVKmuxwYhy4HzouTiPMCy7_rwf-cF4NV9-L7N86LlS84L3yhTstJ_4BD1yOJEsQn2t2igcWWgs7dI7p1yQ1C7G_py-z5f85eacR7kcVWW0GrrUc3Fo1M1iRXFSGKhqHF9hf-J7qjs27QdD6WG-mI34riPWeHR-ozGofiQkuFphs2W9UvgNWfZbmPSykKoA-yYZEZwnoPz4OVC0xzFxPmUxZQFlIWtZKGzyEtCXdXIWqhvL8KY60_5hn5oKUiWsWElYLphLB-E3SGSqCpWAk7poQF5e-Q9VqJo-cQz9BmWll8cs5tp7aggOIG6ztjdW5SvDQ6rdrU02mlqwICrauzQT0ZqSpVPa-fxf7viIO94rAh9p6Kw73iaL842is-fiJebP_6EQAA__9lwQ-e

# Regression test for #74890. Code should not panic due to distribution already
# provided by input.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ SELECT * FROM [EXPLAIN (DISTSQL) SELECT * FROM regional_by_row_table WHERE pk =
table: regional_by_row_table@regional_by_row_table_pkey
spans: [/'ap-southeast-2'/1 - /'ap-southeast-2'/1] [/'ca-central-1'/1 - /'ca-central-1'/1] [/'us-east-1'/1 - /'us-east-1'/1]
·
Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy8kN2q00AQgO99imWuVFbyV0EWhIimGKhNTQIKTSjb7FCCaTbubrCl5N0lm4taKYdz2sO5nJ9v5ps5gf7dAIMsWkSfc_KWzNPkG1lHP1eLT_GSvP4SZ3n2ffGGXDYo3NWy5c1me9wo-Wdj-LZB8uNrlEak-0U-Eq8kyXyeRTnxgUIrBS75HjWwNXhQUuiUrFBrqcbUyTbE4gDMpVC3XW_GdEmhkgqBncDUpkFgkI97UuQCleMCBYGG140de1Up7FS95-oIFLKOt5oRp4CwAMezeNIbRkKPhj4NAxrOaPgeyoGC7M3ZQRu-Q2DeQG_z9G71LIrDB_dlXf07XKvndj0r9q1UAhWKC71yuHLNUr6TnRP813h9tf-UN6WoO9lqfNRkd1RDscPpDi17VeFKycqumcLEcjYhUJupGkxB3NqS_c2_sHcP7N8DBw_CswvYHcrh1d8AAAD__97CZ-c=
Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy0kN2q2kAQgO_7FMNctWVLfuxFCRQsNtKAVZsEWjBB1uwgqTG73d1QRfLuJcmF9SCHcxQv5-eb-WZOaP5UGGASzsJJCu9hGi--wyr8tZx9iebw9muUpMmP2Tu4bNC0LWXNq_XmuNby79ryTUXw81sYh6B28Bm8HBbTaRKm4CPDWgqa8z0ZDFboYc5QaVmQMVJ3qVPfEIkDBi7DslaN7dI5w0JqwuCEtrQVYYBptycmLkg7LjIUZHlZ9WOvKo2VLvdcH5HhRFbNvjYBqB0DtfMZcAYbBr-RYaJ4V3EyHGfoeI6LectQNvZsYizfEgZey26z9R5hm2WHT-6jjP0HGRe3G59Fm1pqQZrEhWTeXrlpLj9I5YyeNF5f7b_mWTEZJWtDL5rsdmoktjTcYWSjC1pqWfRrhnDRc31CkLFDdTQEUd2X-t_8D3v3wP498OhZ-OMF7LZ5--ZfAAAA___eJXDk

statement ok
SET vectorize=on
Expand Down Expand Up @@ -412,7 +412,7 @@ SELECT * FROM [EXPLAIN (DISTSQL) SELECT * FROM regional_by_row_table WHERE pk =
table: regional_by_row_table@regional_by_row_table_pkey
spans: [/'ca-central-1'/1 - /'ca-central-1'/1] [/'us-east-1'/1 - /'us-east-1'/1]
·
Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJysklFr2zAQx9_3KcQ9bUMjlpPCEAw8NocFsqSzDRvUJqjWEcQcy5Nk1hL83Yflh84jC43TR53up_vd3z6C_VUBhzRex58y8pYsk-1Xchf_uF1_XG3I68-rNEu_rd-QcYPBvdK1qHb3jzujf--cuK-QfP8SJzFpfpIPhBVku1ymcUZCoFBriRtxQAv8DhgUFBqjS7RWm7509A0r-QA8oKDqpnV9uaBQaoPAj-CUqxA4ZP2cBIVEMwuAgkQnVOWfPakUNUYdhHkECmkjasvJLIc8f3gf5DBj_olt6ziJGI1CGs1ptKDRDRQdBd26Jw_rxB6Bs45Oc2VXuJYv7fqk2NbaSDQoR3pFd2KbjX6nm1n4T-Pp0eHUmOZTY4omRTR_RkQWjRIVuTipxXiVtTooR9h_VYJLIkvQNrq2-KyPEfSOKPc47GV1a0q8Nbr0Y4bj1nO-ING64TYcDqvaX_nf6W-YXQOHZ-HFeXh-Dbw4C9-M4KAruld_AgAA__9L0Kp2
Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy0kt-L00AQx9_9K4Z5UlnJj1aQgHByplio7dkEFC6hbLNDWZtk190N3lHyv0uShzNSe3c9-rgz8-l85tsc0P4qMcIkXsTXKbyF2Xr1FW7jHzeLT_MlvP48T9Lk2-INjAcM7aSqebnZ3m-M-r1xfFsSfP8Sr2PQe_gIQQ6r2SyJUwiRYa0ELXlFFqNbDDBnqI0qyFplutKhH5iLO4x8hrLWjevKOcNCGcLogE66kjDCtNuzJi7IeD4yFOS4LPufPap0pY2suLlHhteqbKraRqD3DPQ-ZMAZbBn8RIaJ5l3HyzDL7j74GXqB52PeMlSNe7Cxju8Io6Bl5xkHFzIuzjd-EG1qZQQZEiPJvD1y01K9U9oL_xk8vjo8N6zJJcK6eiSoyROCsmQkL-HZeU3HBy1kJR0E_1XxnxPcmqxWtaUn_SV-50hiR8NdVjWmoBujin7N8Fz1XF8QZN3QDYfHvO5b_Uf1Nxy8BA5PwtPT8OQl8PQk_H4E-23evvoTAAD__82-s3M=

query T
EXPLAIN (VEC) SELECT * FROM regional_by_row_table WHERE pk = 1
Expand All @@ -433,7 +433,7 @@ SET vectorize=off
query T
SELECT * FROM [EXPLAIN (DISTSQL) SELECT * FROM regional_by_row_table WHERE pk = 1] AS temp(a) WHERE a LIKE '%Diagram%'
----
Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykkXFr1EAQxf_3UwwDpa2sJJsqSEBIsRGD8a5eDhR64djeDudisrvubrDlyHeXS4Qa6Qm9_jnvzZv8XnaH_meDKVZ5mb9fwkv4sJh_hpv823V5Wczg7KqoltWX8hymC462ymjRrG_v1878Wgdx2xB8_ZgvcrA_4B3wGi4rCNRaOBPnfxwBZfEph9OTKyW2TrQnp8hQG0kz0ZLH9AY51gytMxvy3ri9tBsWCnmHacxQaduFvVwz3BhHmO4wqNAQprjcMyxISHJRjAwlBaGa4eyjuJl1qhXuHhlWVmifQrTC1erubbzCiEcxCC2BgwnfySHDeRdSyDjLEpZdsOw1y95g3TM0XXhg8kFsCVPes-O4-bHc2cj8RM7kIOcDnienRAOdNk6SIzkhrPtHCs3MK2OjZFqlVK0KwA-ixE_5ZQvy1mhP_7AculwzJLmlsZc3ndvQtTOb4TPjOB9ygyDJh9FNxqHQgzW86d9h_pxw8t_wxSQc93X_4ncAAAD___VzLXM=
Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy0keFr1EAQxb_7VwwDpa2sJBu_SEBoaSMG47VeDhR64di7Hc71kt11d4MtR_53SSLUSCOo-HHemzf5vewR_dcaUyyzIrtawXN4s7x5D3fZp9viMl_A2XVersoPxTlMFxztldGi3mwfNs582wSxrQk-vs2WGdgDvAZewWUJgRoLZ-L8hyOgyN9lcHpyrcTeiebkFBlqI2khGvKY3iHHiqF1ZkfeG9dLx2Ehl_eYxgyVtm3o5YrhzjjC9IhBhZowxVXPsCQhyUUxMpQUhKqHs0_iXlinGuEekOGVqdtG-xTsgYE9JAwEgy2DL8iwtKJ3ojWu1_ev4jVGPIpBaAkcTPhMDquOoWnDI5kPYk-Y8o79HT3_H_QXI_ksbTJL-wjpySlRQ6uNk-RITjir7olaC_PC2CiZFipUowLwWZT4T37ckrw12tMvLHOXK4Yk9zT28qZ1O7p1Zjd8ZhxvhtwgSPJhdJNxyPVgDS_7c5j_Szj5bfjlJBx3VffsewAAAP__tYozcQ==

statement ok
RESET vectorize
Expand Down Expand Up @@ -744,7 +744,7 @@ SELECT * FROM [EXPLAIN (DISTSQL) SELECT * FROM child WHERE NOT EXISTS (SELECT *
table: child@child_pkey
spans: [/'ca-central-1'/10 - /'ca-central-1'/10] [/'us-east-1'/10 - /'us-east-1'/10]
·
Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy0k9Fq20wQhe__pxjmxvbPFq9khYaFgEIjUwVVSm1BA7EIqjQkamWtursCB-N3L5YMsUxtnJTeeWfP8XxnNLtG_atEgXMv8D7F8D9MZ9EXePDu74JrP4ThjT-P51-DEfQF2XNR5vDtszfzYBhGMXj3WyEM-7I6VVSZna5-LHK4guxx-2M0guvwBoZZV7T4KIFoOp17MdjIsJI5hemSNIoHtDBhWCuZkdZSbUvrVuDnKxScYVHVjdmWE4aZVIRijaYwJaHAOP1e0ozSnNSYI8OcTFqU7d-2GdxaFctUvSDDeZ1WWsB4gYvF6pIvcGzxMYe0ysECaZ5JIcOoMQJci7k2JhuGsjGvvbVJnwiFtWHv47PO5XN3bOfx2Ed5XjE0qSItoamkyklR3iNJNn8AD-UHWY_tPnJQLAsD1lEU_pbR3Mqi2k1m0m8Tv9QkIPCmMVyHsQ-3kR8iw27b9iYWSPmzqeGHLCqQlYChO4ErcO3d7rkOXMFq4PCBEMK1OOcXH0fnzXTyziDOvwqyfaurweV-FAarQdbLdmY45y3hZqRrWWk62Jhj3z9hSPkTddunZaMyulMya9t0x6j1tYWctOlu7e7gV-1V-8L2zdbfmO2T5knPzA_Nk5Nm57TZOWm-ODAnm_9-BwAA__8KgMVR
Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy0k_Frm0AUx3_fX_F4vyQZN3Iay8pBwNAaZnHaJcIKjRSnj9bNeO48ISXkfx9qoDEsYW3Zb96779f7fN-922L1O0eBS8dzrkL4CPNF8BXunbtbb-b6MLx2l-HymzeCviB5yvIUvn9xFg4M_SAE564RwrAvK2NFhd7ryocshSkkD83HaAQz_xqGSVc0-CiCYD5fOiGYyLCQKfnxmioU92hgxLBUMqGqkqopbVuBm25QcIZZUda6KUcME6kIxRZ1pnNCgWH8I6cFxSmpMUeGKek4y9vfthnsUmXrWD0jwyuZ1-uiEtAwsT0nMlyWcVMdr3C12lzyFY4NPuYQFykYIPUTKYx2DGWtXzAqHT8SCmPH3oZqvBfV3mOeRDNPor0QVaSyOIe6kColRWkPKtr9JYMvP8lybPbpvWydaTBOovDXdOlGZsW-SZP-MeFzSQI8Zx7CzA9duAlcHxl2M3jQPE_KX3UJP2VWgCwEDO0JTME29xNpWzCFzcDiAyGEbXDOLz6PkGFQawG2wWzzZJDJG4NY_ytI84I3g8vDKAw2g6SX7R_DWa8Jt6CqlEVFRxNz6v4jhpQ-Ujd9laxVQrdKJu0x3TJofW0hpUp3u2a3cIt2q31sh2bjPWbzrHnSM_Nj8-Ss2Tpvts6aL47M0e7DnwAAAP__BdnO9w==

statement ok
SET vectorize=on
Expand Down Expand Up @@ -821,7 +821,7 @@ SELECT * FROM [EXPLAIN (DISTSQL) SELECT * FROM child WHERE EXISTS (SELECT * FROM
table: child@child_pkey
spans: [/'ca-central-1'/10 - /'ca-central-1'/10] [/'us-east-1'/10 - /'us-east-1'/10]
·
Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykk1Fr2zAQgN_3K457STI0IjsZK4KAy-owFzfpYsMKjSmefbTeHMmTZEgJ-e8jdqBxWLp0e7NO9-k-7s4bNL9KFBj5of85hvcwXcxv4N6_uw0vgxn0r4Iojr6GA-gmZE9FmcO3L_7CB_9ulwP9bkaVapJ2n1I9FDlMIHvYfQzgcnYF_ayNOXyQwHw6jfwYXGQoVU6zdEUGxT06mDCstMrIGKV3oU2TEORrFJxhIava7sIJw0xpQrFBW9iSUGCcfi9pQWlOesiRYU42Lcrm2cbeq3SxSvUzMoyqVBoBwyUul-sLvsShw4ccUpmDA8o-kUaG89oK8BzmuZhsGaravtQ2Nn0kFM6W_Zufc66ft3c7z8c96fOiYUgXaQm1VDonTXnHJNn-QXymPqhq6HaVw2JVWHBOqvC3tOZaFXLfmVG3TPxckYDQn8YQ-TcBXM-DGTJsl-2gY6FSP-sKfqhCgpIC-t4IJuC5-93zxjCBdW_Me0IIz-Gcf_w0QIYLWilLUP6V3v0a697FIc9g3cs6Dw7Om9LoLa1ZkKmUNHQ0plNNTxhS_kjtyI2qdUa3WmVNmfY4b7gmkJOx7a3bHgLZXDVrfQg7_wO7r8KjDsyP4dGr8PgITrbvfgcAAP__09SDvA==
Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykk9Fr2zAQxt_3Vxz3kmRoRHY6VgQBl9ZhLm7SxYYVGlM8-2i9OZInyZAS8r8P24HGYeno-madvu_086fTFs3vEgVGfuhfxvARZsvFDdz7d7fhRTCH4VUQxdG3cAR9QfZUlDl8_-ovffDvGg0M-4oq1STtXlI9FDlMIXtoPkZwMb-CYdbVHD5KYDGbRX4MLjKUKqd5uiaD4h4dTBhWWmVkjNJNadsKgnyDgjMsZFXbppwwzJQmFFu0hS0JBcbpj5KWlOakxxwZ5mTTomzbtvRepYt1qp-R4aUq67U0AhomtsdEhlGVNtXxClerzTlf4djhYw6pzMEBZZ9IY7JjqGr7gmFs-kgonB37P1TnvajeHvMkmnsS7YXIkC7SEmqpdE6a8h5UsvvLP8zVJ1WN3T59WKwLC85JFP6WlK5VIfchTfrHxM8VCQj9WQyRfxPA9SKYI8NuBA_CC5X6VVfwUxUSlBQw9CYwBc_dT6R3BlPYDM74QAjhOZzzz19GyHBJa2UJyn-6mwezGZwf-hlsBlmvYdNxUVsBnsM892Q0k7dEsyRTKWno6JpOhZ4wpPyRuis3qtYZ3WqVtcd0y0Xraws5Gdvtut0ikO1WO-GHZuc9ZvdV86Rn5sfmyavmsyNzsvvwJwAA__8mqI1i

statement ok
SET vectorize=on
Expand Down Expand Up @@ -899,7 +899,7 @@ SELECT * FROM [EXPLAIN (DISTSQL) SELECT * FROM child INNER JOIN parent ON p_id =
table: child@child_pkey
spans: [/'ca-central-1'/10 - /'ca-central-1'/10] [/'us-east-1'/10 - /'us-east-1'/10]
·
Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykkmFr2zwQx98_n-K4N2keNCLbHSuCgMvqMJfM7pzABo0pnn202hzJk2TICPnuI3ahcVi6dntnn_TT_fjfbdH-qFHgIppH75fwP8yy9CPcRl9u5pdxAmdX8WK5-DQfw_BC-SDrCuIkiTK4TuMEmsKQcpAm0NzJCqZQ3nUfnz9EWQRlX_N4DulstoiW4CNDpStKijVZFLfoYc6wMboka7XZl7bdhbjaoOAMpWpaty_nDEttCMUWnXQ1ocBl8bWmjIqKzIQjw4pcIevu2U40bIxcF-YnMlw0hbICJitcrTYXfIUTj084FKoCD7R7IIMM09YJCD0W-pjvGOrWPfW2rrgnFN6O_Z2f91K_8NHtZT7-SZ8nDUtGFjW0SpuKDFUDk3z3G_FEv9HNxB8qz-VaOvBOqvDXRHOtpXpMJhi26TfqIJq51t_bBr5pqUArAWdhAFMI_TFcJldwFp7DFDajcz4SQoQe5_ztuzEyzGitHUH9R3q_7pvRxSHPYDMqBw-OB-NgYXAyhuA1MWRkG60sHY3kVMA5Q6ruqR-v1a0p6cbosmvT_6Yd1xUqsq4_9fufWHVH3Qofwt6_wP6zcDCA-TEcPAufH8H57r9fAQAA__8MsXkh
Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykk1Fr2zAQx9_3KY57STI0ItsZK4KAS-swl8zunMAGjSmefbTeHMmTZMgI-e4jdqBxWDravlkn_U4__yVt0fyuUOAimAdXS3gPsyT-AnfB99v5ZRjB8DpcLBdf5yPoL8gfy6qAMIqCBG7iMII60yQtxBHU92UBU8jv249vn4MkgLyrOTyFeDZbBEtwkaFUBUXZmgyKO3QwZVhrlZMxSu9L23ZBWGxQcIalrBu7L6cMc6UJxRZtaStCgcvsR0UJZQXpMUeGBdmsrNq2rahf63Kd6T_I8EpVzVoa0SqxgyUyXNTZvjpe4Wq1ueArHDt8zCGTBTig7CNpTHcMVWOfNIzNHgiFs2OvU3XequofNM-quWfVnowM6TKroJFKF6Sp6Emlu3_8Q6Q-qHrs9u3n5bq04JxV4S9J6UaV8hCS19-mu2dHKc2V-tXU8FOVEpQUMPQ9mILvjuAyuoahP4EpbAYTPhBC-A7n_OOnETJMaK0sQfVfev8INoOLY57BZpD3Gu47xo0V4DvMd5nvnY3Be0kMCZlaSUMnR3Iu4JQhFQ_UHa9Rjc7pVqu83aYbxi3XFgoytpt1u0Eo26n2Nh_Dzltg91nY68H8FPaehScncLp79zcAAP__MAGCxw==

statement ok
SET vectorize=on
Expand Down Expand Up @@ -977,7 +977,7 @@ SELECT * FROM [EXPLAIN (DISTSQL) SELECT * FROM child LEFT JOIN parent ON p_id =
table: child@child_pkey
spans: [/'ca-central-1'/10 - /'ca-central-1'/10] [/'us-east-1'/10 - /'us-east-1'/10]
·
Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykk2Fr2zwQx98_n-K4N2keNCLbGSuCgMvqsBTP7hyPDRpTPPtovTmSJ8mQEvLdR-xC47B07fbOOukn_fjfeYvmZ40Cl0EYvE_hf5gn8Ue4Cb5ehxeLCM4uF8t0-Skcw_BAcV_VJYTBPIWreBFBk2uSFuIImtuqhBkUt93Hlw9BEkDR1xyeQTyfL4MUXGQoVUlRviaD4gYdzBg2WhVkjNL70rY7sCg3KDjDSjat3ZczhoXShGKLtrI1ocA0_1ZTQnlJesKRYUk2r-ru2s7Tb3S1zvUDMlw2uTQCJitcrTbnfIUTh0845LIEB5S9J40M49YK8B3mu5jtGKrWPr1tbH5HKJwd-zs_56V-_qPby3zckz5PGoZ0ldfQSqVL0lQOTLLdb8Qj9UY1E3eoHFbryoJzUoW_JporVcnHZLzhM-lDQ6KfsPhzGiTdnCHDftIOIguV-tE28F1VEpQUcOZ7MAPfHcNFdAln_hRmsBlN-UgI4Tuc87fvxsgwobWyBPUf6f1fsBmdH_IMNqNicOF40Cbmeyfj8V4TT0KmUdLQUatOBZ8xpPKO-rYb1eqCrrUqumf6ZdxxXaEkY_tdt18sZLfVjfYh7PwL7D4LewOYH8Pes_D0CM52__0KAAD__1JWf2Y=
Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykk2Fr2zwQx98_n-K4N2kfNCLbGSuCgEvrsBTP7hyPDRpTPPtovTmWJ8mQEvLdR-RA47B0dH0XnfQ7_fLXeYP6V40CF0EYXKXwP8yS-BPcBd9uw8t5BGfX80W6-Byew_BA8VjVJYTBLIWbeB5BmytqDMQRtPdVCVMo7u2Prx-DJICirzk8g3g2WwQpuMiwkSVF-Yo0ijt0MGPYKlmQ1lLtSht7YF6uUXCGVdN2ZlfOGBZSEYoNmsrUhALT_HtNCeUlqTFHhiWZvKptW-vpt6pa5eoJGV7Juls1WlgltrdEhos231XHS1wu1xd8iWOHjznkTQkOSPNICrMtQ9mZZw1t8gdC4WzZv6k6b1X195on1dyTas9GmlSV19A1UpWkqBxIZds__IdIvpPt2B3ah9WqMuCcVOGvSelGVs0-JG94TfrUkujnLv6SBomdPmTYz99BeqGUP7sWfsiqAdkIOPM9mILvnsNldA1n_gSmsB5N-EgI4Tuc8_cfzpFhQitpCOq_0rtvYz26OOQZrEfFoOGuY9wZAb7DfJf53sl4vNfEk5BuZaPp6KlOBZ8xpPKB-mfXslMF3SpZ2Gv6ZWw5WyhJm37X7Rfzxm7ZKT-EnbfA7ouwN4D5Mey9CE-O4Gz73-8AAAD__1ZPiQw=

statement ok
SET vectorize=on
Expand Down
4 changes: 2 additions & 2 deletions pkg/server/admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1765,8 +1765,8 @@ func TestAdminAPIQueryPlan(t *testing.T) {
query string
exp []string
}{
{"SELECT sum(id) FROM api_test.t1", []string{"nodeNames\":[\"1\"]", "Out: @1"}},
{"SELECT sum(1) FROM api_test.t1 JOIN api_test.t2 on t1.id = t2.id", []string{"nodeNames\":[\"1\"]", "Out: @1"}},
{"SELECT sum(id) FROM api_test.t1", []string{"nodeNames\":[\"1\"]", "Columns: id"}},
{"SELECT sum(1) FROM api_test.t1 JOIN api_test.t2 on t1.id = t2.id", []string{"nodeNames\":[\"1\"]", "Columns: id"}},
}
for i, testCase := range testCases {
var res serverpb.QueryPlanResponse
Expand Down
Loading

0 comments on commit 059d5d8

Please sign in to comment.