From a39716b281403d9eaf02237296ce20f0f1fc9d64 Mon Sep 17 00:00:00 2001 From: Jordan Lewis Date: Thu, 8 Apr 2021 18:27:20 -0300 Subject: [PATCH] sql: show single-key spans without a "range dash" Previously, a single-key span (a roachpb.Span with only a StartKey and without an EndKey) was displayed like a normal span, without anything after a dash. For example, a single-key span starting at `/Table/11/1/foo` would display as `/Table/11/1/foo-`. Now, a single-key span is shown without a dash. Release note (sql change): single-key spans in explain and explain(distsql) are now shown without a misleading dash after them. --- .../testdata/logic_test/multi_region | 4 +-- .../testdata/logic_test/regional_by_row | 4 +-- pkg/sql/catalog/catalogkeys/keys.go | 6 ++-- .../execbuilder/testdata/distsql_merge_join | 2 +- .../testdata/distsql_tighten_spans | 4 +-- .../opt/exec/execbuilder/testdata/interleaved | 2 +- pkg/sql/opt/exec/execbuilder/testdata/join | 16 ++++----- .../opt/exec/execbuilder/testdata/join_order | 4 +-- pkg/sql/opt/exec/execbuilder/testdata/orderby | 2 +- pkg/sql/opt/exec/execbuilder/testdata/select | 8 ++--- .../execbuilder/testdata/select_for_update | 36 +++++++++---------- pkg/sql/opt/exec/execbuilder/testdata/unique | 6 ++-- pkg/sql/opt/exec/execbuilder/testdata/upsert | 4 +-- .../exec/execbuilder/testdata/virtual_columns | 2 +- pkg/sql/testdata/explain_tree | 2 +- 15 files changed, 52 insertions(+), 50 deletions(-) diff --git a/pkg/ccl/logictestccl/testdata/logic_test/multi_region b/pkg/ccl/logictestccl/testdata/logic_test/multi_region index 1dceece1d960..cc3e9c929746 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/multi_region +++ b/pkg/ccl/logictestccl/testdata/logic_test/multi_region @@ -1474,7 +1474,7 @@ vectorized: true table: orders@primary 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_l0MjjmvBnn35PcvzqvcE5xXnlCHddDf4tjtdSBVAjzQ7ooMMpyWLoLYY7HP4gCTFUNdujuq1qWXhJG3Yi-T4z1ZTk289zJJT5bhb5Rxx75UDUkSa8yT1T-ETnRHF11_XeJYLqUDbyOH3nOsPNFS3TgZrK9pz_mek2Otv5UFfNVSgVYRxDVgRkqQaZyBOGAQ-_W3G-9tpBc8h96MbKGVpQdWbRKeMCRxSa3fVpcmo1Ojs2ZNG04bXJMQZF1b9dtgpJpSc4r3wd7_gP1HwcEauPcQHDwKDh-Ak9WrPwEAAP__jsyklQ== +Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykUttO20AQfe9XjOaFizZKfIEES0hGbUqD0oQmVK3UtZDxjmHbZNfdXauuUJ76bf2vyjYUghoE9MHWzuXMnHM012i_LzDC4efT8dFoAttvRvOz-YfxDsyH4-HrM9BGkDmXgkFh9FLfvGRGcDRvH-c_pLvSpTtvGm6ruyCkzXSp3Hpj2wVvZ9P37WwLJ9PRpJ1u4eN8NDmG7dtdO_Dp3XA2_MsCDmHrIKTwYhD2O4Pczzthmu11BkHudfZDT-xTIPK-399ChkoLmqRLshh9wRAThoXRGVmrTZ26bhpGosKox1CqonR1OmGYaUMYXaOTbkEY4Vl6saAZpYJMt4cMBblULpqxrYK4MHKZmp_IcF6kykbQ5Rhz7HLkvDoIOa-o_l0MjjmvBnn35PcvzqvcE5xXnlCHddDf4tjtQaoEeKDdFRlkOC1dBLHHYp_FASYrhrp0d0ytSy8JI2_FXqbGe7KamnfvRYqerMLfqOKOfKkajiTWiCerf-ic6I4uuv66wrFcSgfeRg695zh5oqW6MTJYX9Me8z0jx1p_Kwv4qqUCrSKIa8CMlCDTOANxwCD262833ttIL3gOvRnZQitLD6zaJDxhSOKSWr-tLk1Gp0ZnzZo2nDa4JiHIurbqt8FINaXmEu-Dvf8B-4-CgzVw7yE4eBQcPgAnq1d_AgAA__8yFKQ7 query T nodeidx=3 USE multi_region_test_db; EXPLAIN (DISTSQL) SELECT @@ -1511,4 +1511,4 @@ vectorized: true table: orders@primary 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-4Lz0hTqtDt0DDm2vRRIliE-0u0EDFMaFiwnzKQsoi2C2oqAL94BqXXKNEPsr-jw7_qPtVODe8yw92kaw08YDfaFqSBQb5LPVX4yOdEvn7WDT4lAupSP-TgbvKU85UN_QOBTnWio07XCzVDParFnm1TTPpSiB3sv6ZW4I69zPPQu3nirc91rhU0grwnXPox2Udz0fav2lyMlnLRXRKiasEoxHhHU3QSeoBJqalbBjSlhQfQ5ZZydx9BTiCdpcK4tbfd7VtRkFFNfYDIvVhUnxwui0LtMcx7WuDgi0rrkNmsNA1Vf1_-hPsf8v4mCvONwQe9vicK842i-O9oqPt8Sz1X-_AwAA__8IW_4X +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-ZTFlAWwWxFQRfugdS65Boh9lf0eW78R7upuL1nOXq0i2Cniwf4QtWMKDbAZ6u_-Bzpls7bwabDoVxKR_ydDN5TXnKgvqFxKM61VGja4WapZrBZs8yrWZ5LUQK9l_XL3BDWuZ96Fm49VbjvtcKnkFaE65ZHOyjvWj7U-kuRk89aKqJVTFglGI8I626CTlAJNDUrYceUsKD6HLLOTuLoKcQTtLlWFrf6vKtrMwoorrEZFqsLk-KF0WldpjmOa10dEGhdcxs0h4Gqr-q_0Z9i_1_EwV5xuCH2tsXhXnG0XxztFR9viWer_34HAAD__0Dh_b0= diff --git a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row index 8c9e35ff2792..6376fd9917fc 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row +++ b/pkg/ccl/logictestccl/testdata/logic_test/regional_by_row @@ -716,7 +716,7 @@ vectorized: true table: regional_by_row_table@primary 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#eJykkVFr2zAUhd_3K8R92oaCLWeDIRh4bB4zeElmB1aoTVCsS2rqSK4k04Tg_15iF9KUpJD08Z6rc_QdaQf2oQYO0c0s-RFPyMdfcTbP_iWfSBYl0c85-Ux-p9O_xOCq0krUi-V2YfTjwolljeT_nyiNSHNPvhMGFJSWOBFrtMBvgUFBoTG6RGu12Uu7_kAsN8B9CpVqWreXCwqlNgh8B65yNQKH-T49RSHReD5QkOhEVfexJ0HCxlRrYbZAIWuEspx4OeT55pufg8c8f0SEkoQR7e7QAIVp6zgJGQ0DGo5p-IWGX6HoKOjWHaCsEysEzjp6HTi7Fjx8hr4QNDgLeuBrlTYSDcojtqI7UWWiR7rxguMSSbWuHGFnGfxLHitF22hl8RXLueSCAsoVDoWsbk2JM6PL_pphnPa-XpBo3bANhiFW_ar_zZdm9h5z8KZ5fGT2u6L78BQAAP__zHAczQ== +Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJykkVFr2zAUhd_3K8R92oaGLWeDIRh4bC41uElqB1qoTVCsS2rqSK4k04Tg_15iP6QpSSHp4z1X5-g70hbscw0covtp8jcek6__42yW3SbfSBYl0b8Z-U6u0skNMbistBL1fLGZG_0yd2JRI7m7jtKINE_kD2FAQWmJY7FCC_wBGBQUGqNLtFabnbTtD8RyDdynUKmmdTu5oFBqg8C34CpXI3CY7dJTFBKN5wMFiU5UdR97FCRsTLUSZgMUskYoy4mXQ56vf_s5eMzziVCSMKLdIxqgMGkdJyGjYUDDEQ1_0vAXFB0F3bo9k3ViicBZRy_jZpdyhwPzmZzBSc49Xqu0kWhQHqAV3ZEmY_1DN15w2CGpVpUj7CSDf85bpWgbrSy-YzmVXFBAucShkNWtKXFqdNlfM4yT3tcLEq0btsEwxKpf9Z_51sw-Yw4-NI8OzH5XdF9eAwAA__86rhxz statement ok SET tracing = on,kv,results; SELECT * FROM regional_by_row_table WHERE pk = 1; SET tracing = off @@ -862,7 +862,7 @@ vectorized: true table: child@primary 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#eJy0k2Fr2zwQx98_n-K4N0keVCI7LhRBwWF1mYvndIlhhcUUzzpab4nkyTKkhHz3ETujcVhC2rF31un-vt__dLfG6ucCBQYP99E4jKF_E86S2edoALMgCj4k8D_cTiefIH8uFhK-fAymAfTjSQLBwzYR-t20MjOk7C6vfCwkXEP-uP0YDGAc30A_b4MOHyBDpSXF2ZIqFF_RwZRhaXROVaXNNrRuEkK5QsEZFqqs7TacMsy1IRRrtIVdEApMsm8LmlImyQw5MpRks2LR_LYh90tTLDPzggxnZaYqAcM5zuerKz7HocOH_AIyJcEBbZ_JIMNJbQX4DvNdTDcMdW1fi1c2eyIUzoa9D9A5F9D_DXcekHsU6JWjVtpIMiQ7DOnmD8ixvtDl0O3CRsWysOAcZeBvacqdLtSuJ6NumeSlJAFRcJvAOE5CuJuEMTJsx2uvV5HWP-oSvutCgVYC-v4IrsF3d8Pme3ANq57He0II3-GcX3qD85o5eqcR718Z2S7nqne1b4XBqpd3vJ1pznuLuSlVpVYVHUzMsfdPGZJ8onbsKl2bnO6Nzpsy7XHS6JqApMq2t257CFVz1ezWvtj5G7F7UjzqiPmheHRS7J0WeyfFlwfidPPfrwAAAP__ND-8kw== +Diagram: https://cockroachdb.github.io/distsqlplan/decode.html#eJy0k2Fr2zwQx98_n-K4N0keNCI7LhRBwGF1mYvndIlhhcUUzzpab4nkyTKkhHz3ETvQOCwh7dg763R_3-9_uttg9WuJAoOH-2gSxtC_CefJ_Es0gHkQBR8T-B9uZ9PPkD8XSwlfPwWzAPrxNIHgYZcI_W5amRlSdp9XPhYSxpA_7j4GA5jEN9DP26DDB8hQaUlxtqIKxTd0MGVYGp1TVWmzC22ahFCuUXCGhSpruwunDHNtCMUGbWGXhAKT7PuSZpRJMkOODCXZrFg2v23I_dIUq8y8IMN5malKwHCBi8X6mi9w6PAhh0xJcEDbZzLIcFpbAb7DfBfTLUNd29falc2eCIWzZe_jcy7l8_dsl_G4J3leMWqljSRDsoOQbv9AHOsPuhy6XdaoWBUWnJMM_C09udOF2rdk1C2TvJQkIApuE5jESQh30zBGhu1wHbQq0vpnXcIPXSjQSkDfH8EYfHc_ar4HY1j3PN4TQvgO5_zKG1zWzNE7jXj_yshuNde960MrDNa9vOPtQnPeW8zNqCq1quhoYk69f8qQ5BO1Y1fp2uR0b3TelGmP00bXBCRVtr1120OomqtmtQ7Fzt-I3bPiUUfMj8Wjs2LvvNg7K746Eqfb_34HAAD__-igvDk= statement ok SET tracing = on,kv,results; SELECT * FROM child WHERE NOT EXISTS (SELECT * FROM parent WHERE p_id = c_p_id) AND c_id = 10; SET tracing = off diff --git a/pkg/sql/catalog/catalogkeys/keys.go b/pkg/sql/catalog/catalogkeys/keys.go index 81cce5bf3ea5..47d52ee734b9 100644 --- a/pkg/sql/catalog/catalogkeys/keys.go +++ b/pkg/sql/catalog/catalogkeys/keys.go @@ -130,8 +130,10 @@ func PrettyKey(valDirs []encoding.Direction, key roachpb.Key, skip int) string { func PrettySpan(valDirs []encoding.Direction, span roachpb.Span, skip int) string { var b strings.Builder b.WriteString(PrettyKey(valDirs, span.Key, skip)) - b.WriteByte('-') - b.WriteString(PrettyKey(valDirs, span.EndKey, skip)) + if span.EndKey != nil { + b.WriteByte('-') + b.WriteString(PrettyKey(valDirs, span.EndKey, skip)) + } return b.String() } diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_merge_join b/pkg/sql/opt/exec/execbuilder/testdata/distsql_merge_join index 2c63fd59d375..d0cd8b52b410 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_merge_join +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_merge_join @@ -456,7 +456,7 @@ vectorized: true │ ordering: +pid1 │ estimated row count: 4 (missing stats) │ table: parent1@primary - │ spans: /1/0- /11/0- /21/0- /31/0- + │ spans: /1/0 /11/0 /21/0 /31/0 │ parallel │ └── • scan diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_tighten_spans b/pkg/sql/opt/exec/execbuilder/testdata/distsql_tighten_spans index 0b5439105b15..7d42805efe13 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_tighten_spans +++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_tighten_spans @@ -250,7 +250,7 @@ SELECT info FROM [EXPLAIN (VERBOSE) SELECT * FROM p2@p2_id WHERE i >= 1 AND d IS query T SELECT info FROM [EXPLAIN (VERBOSE) SELECT * FROM bytes_t WHERE a = 'a'] WHERE info LIKE '%spans%' ---- - spans: /"a"/0- + spans: /"a"/0 # No tightening. @@ -262,7 +262,7 @@ SELECT info FROM [EXPLAIN (VERBOSE) SELECT * FROM bytes_t WHERE a < 'aa'] WHERE query T SELECT info FROM [EXPLAIN (VERBOSE) SELECT * FROM decimal_t WHERE a = 1.00] WHERE info LIKE '%spans%' ---- - spans: /1/0- + spans: /1/0 # No tightening. diff --git a/pkg/sql/opt/exec/execbuilder/testdata/interleaved b/pkg/sql/opt/exec/execbuilder/testdata/interleaved index d328ee28a2e1..146b867705f7 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/interleaved +++ b/pkg/sql/opt/exec/execbuilder/testdata/interleaved @@ -77,7 +77,7 @@ SELECT info FROM [ EXPLAIN (VERBOSE) SELECT * FROM level4 WHERE k1 = 2 AND k2 = 20 AND k3 = 200 ] WHERE info LIKE '%spans%' ---- - spans: /2/#/54/1/#/55/1/20/200/#/56/1/0- + spans: /2/#/54/1/#/55/1/20/200/#/56/1/0 # ------------------------------------------------------------------------------ # Trace of interleaved fetches from interesting interleaved hierarchy. diff --git a/pkg/sql/opt/exec/execbuilder/testdata/join b/pkg/sql/opt/exec/execbuilder/testdata/join index bfc0c8cf3ad4..66eb93d33f1d 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/join +++ b/pkg/sql/opt/exec/execbuilder/testdata/join @@ -1636,13 +1636,13 @@ vectorized: true │ columns: (a, b1) │ estimated row count: 1 (missing stats) │ table: l@primary - │ spans: /3/0- + │ spans: /3/0 │ └── • scan columns: (a, b2) estimated row count: 1 (missing stats) table: r@primary - spans: /3/0- + spans: /3/0 query T EXPLAIN (VERBOSE) SELECT * FROM l LEFT OUTER JOIN r ON l.a = r.a WHERE l.a = 3; @@ -1662,13 +1662,13 @@ vectorized: true │ columns: (a, b1) │ estimated row count: 1 (missing stats) │ table: l@primary -│ spans: /3/0- +│ spans: /3/0 │ └── • scan columns: (a, b2) estimated row count: 1 (missing stats) table: r@primary - spans: /3/0- + spans: /3/0 query T EXPLAIN (VERBOSE) SELECT * FROM l RIGHT OUTER JOIN r USING(a) WHERE a = 3; @@ -1692,13 +1692,13 @@ vectorized: true │ columns: (a, b2) │ estimated row count: 1 (missing stats) │ table: r@primary - │ spans: /3/0- + │ spans: /3/0 │ └── • scan columns: (a, b1) estimated row count: 1 (missing stats) table: l@primary - spans: /3/0- + spans: /3/0 query T EXPLAIN (VERBOSE) SELECT * FROM l RIGHT OUTER JOIN r ON l.a = r.a WHERE r.a = 3; @@ -1718,13 +1718,13 @@ vectorized: true │ columns: (a, b2) │ estimated row count: 1 (missing stats) │ table: r@primary -│ spans: /3/0- +│ spans: /3/0 │ └── • scan columns: (a, b1) estimated row count: 1 (missing stats) table: l@primary - spans: /3/0- + spans: /3/0 # Regression tests for #21243 statement ok diff --git a/pkg/sql/opt/exec/execbuilder/testdata/join_order b/pkg/sql/opt/exec/execbuilder/testdata/join_order index 6d0c93f175ca..93d02f3846da 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/join_order +++ b/pkg/sql/opt/exec/execbuilder/testdata/join_order @@ -60,7 +60,7 @@ vectorized: true columns: (a, b, c, d) estimated row count: 1 (missing stats) table: abc@primary - spans: /1/0- + spans: /1/0 statement ok SET reorder_joins_limit = 3 @@ -89,4 +89,4 @@ vectorized: true columns: (a, b, c, d) estimated row count: 1 (missing stats) table: abc@primary - spans: /1/0- + spans: /1/0 diff --git a/pkg/sql/opt/exec/execbuilder/testdata/orderby b/pkg/sql/opt/exec/execbuilder/testdata/orderby index 13b20e59f144..f56d32d51eca 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/orderby +++ b/pkg/sql/opt/exec/execbuilder/testdata/orderby @@ -755,7 +755,7 @@ vectorized: true columns: (a, b) estimated row count: 1 (missing stats) table: t@primary - spans: /3/0- + spans: /3/0 query T EXPLAIN (VERBOSE) UPDATE t SET c = TRUE RETURNING b diff --git a/pkg/sql/opt/exec/execbuilder/testdata/select b/pkg/sql/opt/exec/execbuilder/testdata/select index 50473d3653ca..cdc750ac3703 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/select +++ b/pkg/sql/opt/exec/execbuilder/testdata/select @@ -357,7 +357,7 @@ vectorized: true columns: (x, y) estimated row count: 1 (missing stats) table: a@primary - spans: /2/0- + spans: /2/0 query T EXPLAIN (VERBOSE) SELECT * FROM a WHERE x > 1 AND y < 30 @@ -874,7 +874,7 @@ vectorized: true columns: (d decimal, v decimal) estimated row count: 1 (missing stats) table: dec@primary - spans: /NaN/NaN/0- + spans: /NaN/NaN/0 # Test again with separate column families. @@ -904,7 +904,7 @@ vectorized: true columns: (d decimal, v decimal) estimated row count: 1 (missing stats) table: dec@primary - spans: /Infinity/Infinity/0- + spans: /Infinity/Infinity/0 query T EXPLAIN (TYPES) SELECT * FROM dec WHERE d = '-Infinity' and v = '-Infinity' @@ -916,7 +916,7 @@ vectorized: true columns: (d decimal, v decimal) estimated row count: 1 (missing stats) table: dec@primary - spans: /-Infinity/-Infinity/0- + spans: /-Infinity/-Infinity/0 statement ok DROP TABLE dec diff --git a/pkg/sql/opt/exec/execbuilder/testdata/select_for_update b/pkg/sql/opt/exec/execbuilder/testdata/select_for_update index d4bdbc5e3c51..64d6ab8e94ca 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/select_for_update +++ b/pkg/sql/opt/exec/execbuilder/testdata/select_for_update @@ -148,7 +148,7 @@ vectorized: true columns: (a, b) estimated row count: 1 (missing stats) table: t@primary - spans: /1/0- + spans: /1/0 locking strength: for update query T @@ -161,7 +161,7 @@ vectorized: true columns: (a, b) estimated row count: 1 (missing stats) table: t@primary - spans: /1/0- + spans: /1/0 locking strength: for no key update query T @@ -174,7 +174,7 @@ vectorized: true columns: (a, b) estimated row count: 1 (missing stats) table: t@primary - spans: /1/0- + spans: /1/0 locking strength: for share query T @@ -187,7 +187,7 @@ vectorized: true columns: (a, b) estimated row count: 1 (missing stats) table: t@primary - spans: /1/0- + spans: /1/0 locking strength: for key share query T @@ -200,7 +200,7 @@ vectorized: true columns: (a, b) estimated row count: 1 (missing stats) table: t@primary - spans: /1/0- + spans: /1/0 locking strength: for share query T @@ -213,7 +213,7 @@ vectorized: true columns: (a, b) estimated row count: 1 (missing stats) table: t@primary - spans: /1/0- + spans: /1/0 locking strength: for no key update query T @@ -226,7 +226,7 @@ vectorized: true columns: (a, b) estimated row count: 1 (missing stats) table: t@primary - spans: /1/0- + spans: /1/0 locking strength: for update query T @@ -239,7 +239,7 @@ vectorized: true columns: (a, b) estimated row count: 1 (missing stats) table: t@primary - spans: /1/0- + spans: /1/0 locking strength: for update query error pgcode 42P01 relation "t2" in FOR UPDATE clause not found in FROM clause @@ -260,7 +260,7 @@ vectorized: true columns: (a) estimated row count: 1 (missing stats) table: t@primary - spans: /1/0- + spans: /1/0 locking strength: for update # ------------------------------------------------------------------------------ @@ -1769,7 +1769,7 @@ vectorized: true columns: (a, b) estimated row count: 1 (missing stats) table: t@primary - spans: /1/0- + spans: /1/0 locking strength: for update locking wait policy: nowait @@ -1783,7 +1783,7 @@ vectorized: true columns: (a, b) estimated row count: 1 (missing stats) table: t@primary - spans: /1/0- + spans: /1/0 locking strength: for no key update locking wait policy: nowait @@ -1797,7 +1797,7 @@ vectorized: true columns: (a, b) estimated row count: 1 (missing stats) table: t@primary - spans: /1/0- + spans: /1/0 locking strength: for share locking wait policy: nowait @@ -1811,7 +1811,7 @@ vectorized: true columns: (a, b) estimated row count: 1 (missing stats) table: t@primary - spans: /1/0- + spans: /1/0 locking strength: for key share locking wait policy: nowait @@ -1825,7 +1825,7 @@ vectorized: true columns: (a, b) estimated row count: 1 (missing stats) table: t@primary - spans: /1/0- + spans: /1/0 locking strength: for share locking wait policy: nowait @@ -1839,7 +1839,7 @@ vectorized: true columns: (a, b) estimated row count: 1 (missing stats) table: t@primary - spans: /1/0- + spans: /1/0 locking strength: for no key update locking wait policy: nowait @@ -1853,7 +1853,7 @@ vectorized: true columns: (a, b) estimated row count: 1 (missing stats) table: t@primary - spans: /1/0- + spans: /1/0 locking strength: for update locking wait policy: nowait @@ -1867,7 +1867,7 @@ vectorized: true columns: (a, b) estimated row count: 1 (missing stats) table: t@primary - spans: /1/0- + spans: /1/0 locking strength: for update locking wait policy: nowait @@ -1889,6 +1889,6 @@ vectorized: true columns: (a) estimated row count: 1 (missing stats) table: t@primary - spans: /1/0- + spans: /1/0 locking strength: for update locking wait policy: nowait diff --git a/pkg/sql/opt/exec/execbuilder/testdata/unique b/pkg/sql/opt/exec/execbuilder/testdata/unique index 728d3a25e436..c2259e28ad92 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/unique +++ b/pkg/sql/opt/exec/execbuilder/testdata/unique @@ -348,7 +348,7 @@ vectorized: true │ columns: (k) │ estimated row count: 1 (missing stats) │ table: uniq@primary - │ spans: /1/0- + │ spans: /1/0 │ └── • hash join (right anti) │ columns: (column1, column2, column3, column4, column5) @@ -1170,7 +1170,7 @@ vectorized: true columns: (k) estimated row count: 1 (missing stats) table: uniq_partial@primary - spans: /1/0- + spans: /1/0 # Insert with non-constant input. query T @@ -2507,7 +2507,7 @@ vectorized: true │ columns: (r, a, b, c) │ estimated row count: 1 (0.10% of the table; stats collected ago) │ table: uniq_partial_enum@primary -│ spans: /"@"/2/0- /"@"/2/2/1-/"@"/2/3/2 /"\x80"/2/0- /"\x80"/2/2/1-/"\x80"/2/3/2 /"\xc0"/2/0- /"\xc0"/2/2/1-/"\xc0"/2/3/2 +│ spans: /"@"/2/0 /"@"/2/2/1-/"@"/2/3/2 /"\x80"/2/0 /"\x80"/2/2/1-/"\x80"/2/3/2 /"\xc0"/2/0 /"\xc0"/2/2/1-/"\xc0"/2/3/2 │ parallel │ locking strength: for update │ diff --git a/pkg/sql/opt/exec/execbuilder/testdata/upsert b/pkg/sql/opt/exec/execbuilder/testdata/upsert index e3b9e21cc826..4222381d4d23 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/upsert +++ b/pkg/sql/opt/exec/execbuilder/testdata/upsert @@ -215,7 +215,7 @@ vectorized: true columns: (a, b, c, d) estimated row count: 1 (missing stats) table: indexed@primary - spans: /1/0- + spans: /1/0 locking strength: for update query T @@ -479,7 +479,7 @@ vectorized: true columns: (a, b) estimated row count: 1 (missing stats) table: table38627@primary - spans: /1/0- + spans: /1/0 statement ok COMMIT diff --git a/pkg/sql/opt/exec/execbuilder/testdata/virtual_columns b/pkg/sql/opt/exec/execbuilder/testdata/virtual_columns index 1a24d9244879..70af76f816ea 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/virtual_columns +++ b/pkg/sql/opt/exec/execbuilder/testdata/virtual_columns @@ -621,7 +621,7 @@ vectorized: true columns: (a, c) estimated row count: 1 (missing stats) table: t_idx@primary - spans: /2/0- /2/2/1- + spans: /2/0 /2/2/1 locking strength: for update query T diff --git a/pkg/sql/testdata/explain_tree b/pkg/sql/testdata/explain_tree index 637ce7a4c688..499549b58b3f 100644 --- a/pkg/sql/testdata/explain_tree +++ b/pkg/sql/testdata/explain_tree @@ -18,7 +18,7 @@ network usage: 0 B (0 messages) columns: (oid int) estimated row count: 1 (missing stats) table: orders@primary - spans: /123/0- + spans: /123/0 ---- ----