Describe the problem
Inconsistent display of table name with EXPLAIN and EXPLAIN ANALYZE
To Reproduce
CREATE TABLE authors (
id INT PRIMARY KEY,
name STRING);
INSERT INTO authors VALUES (1, 'Toni Morrison'),
(2, 'James Tiptree'),
(3, 'Richard Wright');
root@:26257/movr> EXPLAIN SELECT name FROM authors WHERE id=2;
tree | field | description
------------+-------------+------------------
| distributed | false
| vectorized | false
render | |
└── scan | |
| table | authors@primary
| spans | /2-/2/#
(6 rows)
Time: 895.2µs
root@:26257/movr> EXPLAIN ANALYZE SELECT name FROM authors WHERE id=2;
automatic |
url
------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
false | https://cockroachdb.github.io/distsqlplan/decode.html#eJyMkE9Lw0AQxe9-imG8KKymCSqyILRqxEBsa1LwHzlss0MNJNm4s0FLyXeXJIp4EDzOm_fe_nZ2yG8lSgwfl_EsmsNsPoufnkM4uI7SVXofH0IaxuHVCmpVEdwkiztQrXs1luHhNkxCKDRcQIACa6NpripilC_oYyawsSYnZmN7aTcYIv2BciKwqJvW9XImMDeWUO7QFa4klLhS65ISUpqsN0GBmpwqyqG2sUWl7Hb6hYAC00bVLMELjrzA20eBi9ZJmPZA1rwzWFJago8C2amyBFdUJME_Pjs9r_r8euvo23USwCVmnUDTuh88dmpDKP1O_P8LCXFjaqZf9H81T7pMIOkNjWdi09qcltbkwzPjuBhyg6CJ3bj1xyGqx1WXdXufAQAA__9N75LN
(1 row)
Time: 3.267ms
vs

Expected behavior
Table name displayed consistently
Environment:
cockroach sqlHello, I am Blathers. I am here to help you get the issue triaged.
Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here.
I have CC'd a few people who may be able to assist you:
If we have not gotten back to your issue within a few business days, you can try the following:
:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.
I think we should change the distsql diagram to read authors@primary.
Thanks for the feedback. This is timely as we are updating our representation of EXPLAIN ANALYZE cc @RaduBerinde @Annebirzin
We have actually already fixed this inconsistency on 20.2 branch (#52085), so I'll close this issue.
I'll backport that PR to 20.1 branch.
@gliptak Thank you for contributing to CockroachDB this year. As a token of our appreciation we would like to send you a gift. Please DM me on our community Slack @lisa so I can send you a link. (If you don’t want a gift, we also have a charitable contribution choice.) All orders need to be in by December 13, so please send this asap. :)