sql: fix CREATE TABLE AS sourcing SHOW <show_subcmd> <table> job failures#107099
sql: fix CREATE TABLE AS sourcing SHOW <show_subcmd> <table> job failures#107099craig[bot] merged 1 commit intocockroachdb:masterfrom ecwall:sql_fix_show_subcmd_table_job
CREATE TABLE AS sourcing SHOW <show_subcmd> <table> job failures#107099Conversation
…failures Fixes #106260 Previously `CREATE TABLE AS`/`CREATE MATERIALIZED VIEW AS` sourcing from `SHOW <show_subcmd> <table>` generated a failing schema change job with a `relation "tbl" does not exist error` because the SHOW source table was not fully qualified. This PR fixes this by respecting the `Builder.qualifyDataSourceNamesInAST` flag in `delegate.TryDelegate()` which implements the failing SHOW commands. Release note (bug fix): Fix failing schema change job when CREATE TABLE AS or CREATE MATERAILIZED VIEW AS sources from a SHOW command: 1. CREATE TABLE t AS SELECT * FROM [SHOW CREATE TABLE tbl]; 2. CREATE TABLE t AS SELECT * FROM [SHOW INDEXES FROM tbl]; 3. CREATE TABLE t AS SELECT * FROM [SHOW COLUMNS FROM tbl]; 4. CREATE TABLE t AS SELECT * FROM [SHOW CONSTRAINTS FROM tbl]; 5. CREATE TABLE t AS SELECT * FROM [SHOW PARTITIONS FROM TABLE tbl]; 6. CREATE TABLE t AS SELECT * FROM [SHOW PARTITIONS FROM INDEX tbl@tbl_pkey];
|
bors r=chengxiong-ruan |
|
Build succeeded: |
|
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error setting reviewers, but backport branch blathers/backport-release-22.2-107099 is ready: POST https://api.github.com/repos/cockroachdb/cockroach/pulls/107219/requested_reviewers: 422 Reviews may only be requested from collaborators. One or more of the teams you specified is not a collaborator of the cockroachdb/cockroach repository. [] Backport to branch 22.2.x failed. See errors above. error setting reviewers, but backport branch blathers/backport-release-23.1-107099 is ready: POST https://api.github.com/repos/cockroachdb/cockroach/pulls/107220/requested_reviewers: 422 Reviews may only be requested from collaborators. One or more of the teams you specified is not a collaborator of the cockroachdb/cockroach repository. [] Backport to branch 23.1.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Fixes #106260
Previously
CREATE TABLE AS/CREATE MATERIALIZED VIEW ASsourcing fromSHOW <show_subcmd> <table>generated a failing schema change job with arelation "tbl" does not exist errorbecause the SHOW source table was not fully qualified.This PR fixes this by respecting the
Builder.qualifyDataSourceNamesInASTflag indelegate.TryDelegate()which implements the failing SHOW commands.Release note (bug fix): Fix failing schema change job when CREATE TABLE AS or CREATE MATERAILIZED VIEW AS sources from a SHOW command: