vitess.io/vitess@v0.16.2/go/vt/vtgate/planbuilder/testdata/ddl_cases_no_default_keyspace.json (about) 1 [ 2 { 3 "comment": "Create View with qualifier", 4 "query": "create view user.a as select* from user", 5 "plan": { 6 "QueryType": "DDL", 7 "Original": "create view user.a as select* from user", 8 "Instructions": { 9 "OperatorType": "DDL", 10 "Keyspace": { 11 "Name": "user", 12 "Sharded": true 13 }, 14 "Query": "create view a as select * from `user`" 15 }, 16 "TablesUsed": [ 17 "user.a" 18 ] 19 } 20 }, 21 { 22 "comment": "create view with qualifier in select as well", 23 "query": "create view user.a as select* from user.user", 24 "plan": { 25 "QueryType": "DDL", 26 "Original": "create view user.a as select* from user.user", 27 "Instructions": { 28 "OperatorType": "DDL", 29 "Keyspace": { 30 "Name": "user", 31 "Sharded": true 32 }, 33 "Query": "create view a as select * from `user`" 34 }, 35 "TablesUsed": [ 36 "user.a" 37 ] 38 } 39 }, 40 { 41 "comment": "create view with No column referenced", 42 "query": "create view user.view_a as select 1 from user", 43 "plan": { 44 "QueryType": "DDL", 45 "Original": "create view user.view_a as select 1 from user", 46 "Instructions": { 47 "OperatorType": "DDL", 48 "Keyspace": { 49 "Name": "user", 50 "Sharded": true 51 }, 52 "Query": "create view view_a as select 1 from `user`" 53 }, 54 "TablesUsed": [ 55 "user.view_a" 56 ] 57 } 58 }, 59 { 60 "comment": "create view with '*' expression for simple route", 61 "query": "create view user.view_a as select user.* from user", 62 "plan": { 63 "QueryType": "DDL", 64 "Original": "create view user.view_a as select user.* from user", 65 "Instructions": { 66 "OperatorType": "DDL", 67 "Keyspace": { 68 "Name": "user", 69 "Sharded": true 70 }, 71 "Query": "create view view_a as select `user`.* from `user`" 72 }, 73 "TablesUsed": [ 74 "user.view_a" 75 ] 76 } 77 }, 78 { 79 "comment": "create view with unqualified '*' expression for simple route", 80 "query": "create view user.view_a as select * from user", 81 "plan": { 82 "QueryType": "DDL", 83 "Original": "create view user.view_a as select * from user", 84 "Instructions": { 85 "OperatorType": "DDL", 86 "Keyspace": { 87 "Name": "user", 88 "Sharded": true 89 }, 90 "Query": "create view view_a as select * from `user`" 91 }, 92 "TablesUsed": [ 93 "user.view_a" 94 ] 95 } 96 }, 97 { 98 "comment": "create view with fully qualified '*' expression for simple route", 99 "query": "create view user.view_a as select user.user.* from user.user", 100 "plan": { 101 "QueryType": "DDL", 102 "Original": "create view user.view_a as select user.user.* from user.user", 103 "Instructions": { 104 "OperatorType": "DDL", 105 "Keyspace": { 106 "Name": "user", 107 "Sharded": true 108 }, 109 "Query": "create view view_a as select `user`.* from `user`" 110 }, 111 "TablesUsed": [ 112 "user.view_a" 113 ] 114 } 115 }, 116 { 117 "comment": "create view with select * from authoritative table", 118 "query": "create view user.view_a as select * from authoritative", 119 "v3-plan": { 120 "QueryType": "DDL", 121 "Original": "create view user.view_a as select * from authoritative", 122 "Instructions": { 123 "OperatorType": "DDL", 124 "Keyspace": { 125 "Name": "user", 126 "Sharded": true 127 }, 128 "Query": "create view view_a as select * from authoritative" 129 }, 130 "TablesUsed": [ 131 "user.view_a" 132 ] 133 }, 134 "gen4-plan": { 135 "QueryType": "DDL", 136 "Original": "create view user.view_a as select * from authoritative", 137 "Instructions": { 138 "OperatorType": "DDL", 139 "Keyspace": { 140 "Name": "user", 141 "Sharded": true 142 }, 143 "Query": "create view view_a as select user_id, col1, col2 from authoritative" 144 }, 145 "TablesUsed": [ 146 "user.view_a" 147 ] 148 } 149 }, 150 { 151 "comment": "create view with select * from join of authoritative tables", 152 "query": "create view user.view_a as select * from authoritative a join authoritative b on a.user_id=b.user_id", 153 "v3-plan": { 154 "QueryType": "DDL", 155 "Original": "create view user.view_a as select * from authoritative a join authoritative b on a.user_id=b.user_id", 156 "Instructions": { 157 "OperatorType": "DDL", 158 "Keyspace": { 159 "Name": "user", 160 "Sharded": true 161 }, 162 "Query": "create view view_a as select * from authoritative as a join authoritative as b on a.user_id = b.user_id" 163 }, 164 "TablesUsed": [ 165 "user.view_a" 166 ] 167 }, 168 "gen4-plan": { 169 "QueryType": "DDL", 170 "Original": "create view user.view_a as select * from authoritative a join authoritative b on a.user_id=b.user_id", 171 "Instructions": { 172 "OperatorType": "DDL", 173 "Keyspace": { 174 "Name": "user", 175 "Sharded": true 176 }, 177 "Query": "create view view_a as select a.user_id as user_id, a.col1 as col1, a.col2 as col2, b.user_id as user_id, b.col1 as col1, b.col2 as col2 from authoritative as a join authoritative as b on a.user_id = b.user_id" 178 }, 179 "TablesUsed": [ 180 "user.view_a" 181 ] 182 } 183 }, 184 { 185 "comment": "create view with select * from qualified authoritative table", 186 "query": "create view user.view_a as select a.* from authoritative a", 187 "v3-plan": { 188 "QueryType": "DDL", 189 "Original": "create view user.view_a as select a.* from authoritative a", 190 "Instructions": { 191 "OperatorType": "DDL", 192 "Keyspace": { 193 "Name": "user", 194 "Sharded": true 195 }, 196 "Query": "create view view_a as select a.* from authoritative as a" 197 }, 198 "TablesUsed": [ 199 "user.view_a" 200 ] 201 }, 202 "gen4-plan": { 203 "QueryType": "DDL", 204 "Original": "create view user.view_a as select a.* from authoritative a", 205 "Instructions": { 206 "OperatorType": "DDL", 207 "Keyspace": { 208 "Name": "user", 209 "Sharded": true 210 }, 211 "Query": "create view view_a as select a.user_id, a.col1, a.col2 from authoritative as a" 212 }, 213 "TablesUsed": [ 214 "user.view_a" 215 ] 216 } 217 }, 218 { 219 "comment": "create view with select * from intermixing of authoritative table with non-authoritative results in no expansion", 220 "query": "create view user.view_a as select * from authoritative join user on authoritative.user_id=user.id", 221 "plan": { 222 "QueryType": "DDL", 223 "Original": "create view user.view_a as select * from authoritative join user on authoritative.user_id=user.id", 224 "Instructions": { 225 "OperatorType": "DDL", 226 "Keyspace": { 227 "Name": "user", 228 "Sharded": true 229 }, 230 "Query": "create view view_a as select * from authoritative join `user` on authoritative.user_id = `user`.id" 231 }, 232 "TablesUsed": [ 233 "user.view_a" 234 ] 235 } 236 }, 237 { 238 "comment": "create view with select authoritative.* with intermixing still expands", 239 "query": "create view user.view_a as select user.id, a.*, user.col1 from authoritative a join user on a.user_id=user.id", 240 "v3-plan": { 241 "QueryType": "DDL", 242 "Original": "create view user.view_a as select user.id, a.*, user.col1 from authoritative a join user on a.user_id=user.id", 243 "Instructions": { 244 "OperatorType": "DDL", 245 "Keyspace": { 246 "Name": "user", 247 "Sharded": true 248 }, 249 "Query": "create view view_a as select `user`.id, a.*, `user`.col1 from authoritative as a join `user` on a.user_id = `user`.id" 250 }, 251 "TablesUsed": [ 252 "user.view_a" 253 ] 254 }, 255 "gen4-plan": { 256 "QueryType": "DDL", 257 "Original": "create view user.view_a as select user.id, a.*, user.col1 from authoritative a join user on a.user_id=user.id", 258 "Instructions": { 259 "OperatorType": "DDL", 260 "Keyspace": { 261 "Name": "user", 262 "Sharded": true 263 }, 264 "Query": "create view view_a as select `user`.id, a.user_id as user_id, a.col1 as col1, a.col2 as col2, `user`.col1 from authoritative as a join `user` on a.user_id = `user`.id" 265 }, 266 "TablesUsed": [ 267 "user.view_a" 268 ] 269 } 270 }, 271 { 272 "comment": "create view with auto-resolve anonymous columns for simple route", 273 "query": "create view user.view_a as select user.col from user join user_extra on user.id = user_extra.user_id", 274 "plan": { 275 "QueryType": "DDL", 276 "Original": "create view user.view_a as select user.col from user join user_extra on user.id = user_extra.user_id", 277 "Instructions": { 278 "OperatorType": "DDL", 279 "Keyspace": { 280 "Name": "user", 281 "Sharded": true 282 }, 283 "Query": "create view view_a as select `user`.col from `user` join user_extra on `user`.id = user_extra.user_id" 284 }, 285 "TablesUsed": [ 286 "user.view_a" 287 ] 288 } 289 }, 290 { 291 "comment": "create view with join that can be solved in each shard separately", 292 "query": "create view user.view_a as select user.id from user join user_extra on user.id = user_extra.user_id", 293 "plan": { 294 "QueryType": "DDL", 295 "Original": "create view user.view_a as select user.id from user join user_extra on user.id = user_extra.user_id", 296 "Instructions": { 297 "OperatorType": "DDL", 298 "Keyspace": { 299 "Name": "user", 300 "Sharded": true 301 }, 302 "Query": "create view view_a as select `user`.id from `user` join user_extra on `user`.id = user_extra.user_id" 303 }, 304 "TablesUsed": [ 305 "user.view_a" 306 ] 307 } 308 }, 309 { 310 "comment": "create view with last_insert_id for unsharded route", 311 "query": "create view main.view_a as select last_insert_id() as x from main.unsharded", 312 "plan": { 313 "QueryType": "DDL", 314 "Original": "create view main.view_a as select last_insert_id() as x from main.unsharded", 315 "Instructions": { 316 "OperatorType": "DDL", 317 "Keyspace": { 318 "Name": "main", 319 "Sharded": false 320 }, 321 "Query": "create view view_a as select :__lastInsertId as x from unsharded" 322 }, 323 "TablesUsed": [ 324 "main.view_a" 325 ] 326 } 327 }, 328 { 329 "comment": "create view with select from pinned table", 330 "query": "create view user.view_a as select * from pin_test", 331 "plan": { 332 "QueryType": "DDL", 333 "Original": "create view user.view_a as select * from pin_test", 334 "Instructions": { 335 "OperatorType": "DDL", 336 "Keyspace": { 337 "Name": "user", 338 "Sharded": true 339 }, 340 "Query": "create view view_a as select * from pin_test" 341 }, 342 "TablesUsed": [ 343 "user.view_a" 344 ] 345 } 346 }, 347 { 348 "comment": "create view with Expression with single-route reference", 349 "query": "create view user.view_a as select user.col, user_extra.id + user_extra.col from user join user_extra on user.id = user_extra.user_id", 350 "plan": { 351 "QueryType": "DDL", 352 "Original": "create view user.view_a as select user.col, user_extra.id + user_extra.col from user join user_extra on user.id = user_extra.user_id", 353 "Instructions": { 354 "OperatorType": "DDL", 355 "Keyspace": { 356 "Name": "user", 357 "Sharded": true 358 }, 359 "Query": "create view view_a as select `user`.col, user_extra.id + user_extra.col from `user` join user_extra on `user`.id = user_extra.user_id" 360 }, 361 "TablesUsed": [ 362 "user.view_a" 363 ] 364 } 365 }, 366 { 367 "comment": "create view with Comments", 368 "query": "create view user.view_a as select /* comment */ user.col from user join user_extra on user.id = user_extra.user_id", 369 "plan": { 370 "QueryType": "DDL", 371 "Original": "create view user.view_a as select /* comment */ user.col from user join user_extra on user.id = user_extra.user_id", 372 "Instructions": { 373 "OperatorType": "DDL", 374 "Keyspace": { 375 "Name": "user", 376 "Sharded": true 377 }, 378 "Query": "create view view_a as select /* comment */ `user`.col from `user` join user_extra on `user`.id = user_extra.user_id" 379 }, 380 "TablesUsed": [ 381 "user.view_a" 382 ] 383 } 384 }, 385 { 386 "comment": "create view with for update", 387 "query": "create view user.view_a as select user.col from user join user_extra on user.id = user_extra.user_id for update", 388 "plan": { 389 "QueryType": "DDL", 390 "Original": "create view user.view_a as select user.col from user join user_extra on user.id = user_extra.user_id for update", 391 "Instructions": { 392 "OperatorType": "DDL", 393 "Keyspace": { 394 "Name": "user", 395 "Sharded": true 396 }, 397 "Query": "create view view_a as select `user`.col from `user` join user_extra on `user`.id = user_extra.user_id for update" 398 }, 399 "TablesUsed": [ 400 "user.view_a" 401 ] 402 } 403 }, 404 { 405 "comment": "create view with Case preservation", 406 "query": "create view user.view_a as select user.Col, user_extra.Id from user join user_extra on user.id = user_extra.user_id", 407 "plan": { 408 "QueryType": "DDL", 409 "Original": "create view user.view_a as select user.Col, user_extra.Id from user join user_extra on user.id = user_extra.user_id", 410 "Instructions": { 411 "OperatorType": "DDL", 412 "Keyspace": { 413 "Name": "user", 414 "Sharded": true 415 }, 416 "Query": "create view view_a as select `user`.Col, user_extra.Id from `user` join user_extra on `user`.id = user_extra.user_id" 417 }, 418 "TablesUsed": [ 419 "user.view_a" 420 ] 421 } 422 }, 423 { 424 "comment": "create view with syntax error", 425 "query": "create view user.view_a as the quick brown fox", 426 "plan": "syntax error at position 31 near 'the'" 427 }, 428 { 429 "comment": "create view with Hex number is not treated as a simple value", 430 "query": "create view user.view_a as select * from user where id = 0x04", 431 "plan": { 432 "QueryType": "DDL", 433 "Original": "create view user.view_a as select * from user where id = 0x04", 434 "Instructions": { 435 "OperatorType": "DDL", 436 "Keyspace": { 437 "Name": "user", 438 "Sharded": true 439 }, 440 "Query": "create view view_a as select * from `user` where id = 0x04" 441 }, 442 "TablesUsed": [ 443 "user.view_a" 444 ] 445 } 446 }, 447 { 448 "comment": "create view with limit works if it can be dropped", 449 "query": "create view user.view_a as select * from user where name ='abc' AND (id = 4) limit 5", 450 "plan": { 451 "QueryType": "DDL", 452 "Original": "create view user.view_a as select * from user where name ='abc' AND (id = 4) limit 5", 453 "Instructions": { 454 "OperatorType": "DDL", 455 "Keyspace": { 456 "Name": "user", 457 "Sharded": true 458 }, 459 "Query": "create view view_a as select * from `user` where `name` = 'abc' and id = 4 limit 5" 460 }, 461 "TablesUsed": [ 462 "user.view_a" 463 ] 464 } 465 }, 466 { 467 "comment": "create view with Multiple parenthesized expressions", 468 "query": "create view user.view_a as select * from user where (id = 4) AND (name ='abc') limit 5", 469 "plan": { 470 "QueryType": "DDL", 471 "Original": "create view user.view_a as select * from user where (id = 4) AND (name ='abc') limit 5", 472 "Instructions": { 473 "OperatorType": "DDL", 474 "Keyspace": { 475 "Name": "user", 476 "Sharded": true 477 }, 478 "Query": "create view view_a as select * from `user` where id = 4 and `name` = 'abc' limit 5" 479 }, 480 "TablesUsed": [ 481 "user.view_a" 482 ] 483 } 484 }, 485 { 486 "comment": "create view with Multiple parenthesized expressions", 487 "query": "create view user.view_a as select * from user where (id = 4 and name ='abc') limit 5", 488 "plan": { 489 "QueryType": "DDL", 490 "Original": "create view user.view_a as select * from user where (id = 4 and name ='abc') limit 5", 491 "Instructions": { 492 "OperatorType": "DDL", 493 "Keyspace": { 494 "Name": "user", 495 "Sharded": true 496 }, 497 "Query": "create view view_a as select * from `user` where id = 4 and `name` = 'abc' limit 5" 498 }, 499 "TablesUsed": [ 500 "user.view_a" 501 ] 502 } 503 }, 504 { 505 "comment": "create view with Column Aliasing with Table.Column", 506 "query": "create view user.view_a as select user0_.col as col0_ from user user0_ where id = 1 order by user0_.col", 507 "plan": { 508 "QueryType": "DDL", 509 "Original": "create view user.view_a as select user0_.col as col0_ from user user0_ where id = 1 order by user0_.col", 510 "Instructions": { 511 "OperatorType": "DDL", 512 "Keyspace": { 513 "Name": "user", 514 "Sharded": true 515 }, 516 "Query": "create view view_a as select user0_.col as col0_ from `user` as user0_ where id = 1 order by user0_.col asc" 517 }, 518 "TablesUsed": [ 519 "user.view_a" 520 ] 521 } 522 }, 523 { 524 "comment": "create view with Column Aliasing with Column", 525 "query": "create view user.view_a as select user0_.col as col0_ from user user0_ where id = 1 order by col0_ desc", 526 "plan": { 527 "QueryType": "DDL", 528 "Original": "create view user.view_a as select user0_.col as col0_ from user user0_ where id = 1 order by col0_ desc", 529 "Instructions": { 530 "OperatorType": "DDL", 531 "Keyspace": { 532 "Name": "user", 533 "Sharded": true 534 }, 535 "Query": "create view view_a as select user0_.col as col0_ from `user` as user0_ where id = 1 order by col0_ desc" 536 }, 537 "TablesUsed": [ 538 "user.view_a" 539 ] 540 } 541 }, 542 { 543 "comment": "create view with Booleans and parenthesis", 544 "query": "create view user.view_a as select * from user where (id = 1) AND name = true", 545 "plan": { 546 "QueryType": "DDL", 547 "Original": "create view user.view_a as select * from user where (id = 1) AND name = true", 548 "Instructions": { 549 "OperatorType": "DDL", 550 "Keyspace": { 551 "Name": "user", 552 "Sharded": true 553 }, 554 "Query": "create view view_a as select * from `user` where id = 1 and `name` = true" 555 }, 556 "TablesUsed": [ 557 "user.view_a" 558 ] 559 } 560 }, 561 { 562 "comment": "create view with union with the same target shard", 563 "query": "create view user.view_a as select * from music where user_id = 1 union select * from user where id = 1", 564 "plan": { 565 "QueryType": "DDL", 566 "Original": "create view user.view_a as select * from music where user_id = 1 union select * from user where id = 1", 567 "Instructions": { 568 "OperatorType": "DDL", 569 "Keyspace": { 570 "Name": "user", 571 "Sharded": true 572 }, 573 "Query": "create view view_a as select * from music where user_id = 1 union select * from `user` where id = 1" 574 }, 575 "TablesUsed": [ 576 "user.view_a" 577 ] 578 } 579 }, 580 { 581 "comment": "create view with testing SingleRow Projection", 582 "query": "create view user.view_a as select 42 from user", 583 "plan": { 584 "QueryType": "DDL", 585 "Original": "create view user.view_a as select 42 from user", 586 "Instructions": { 587 "OperatorType": "DDL", 588 "Keyspace": { 589 "Name": "user", 590 "Sharded": true 591 }, 592 "Query": "create view view_a as select 42 from `user`" 593 }, 594 "TablesUsed": [ 595 "user.view_a" 596 ] 597 } 598 }, 599 { 600 "comment": "create view with sql_calc_found_rows without limit", 601 "query": "create view user.view_a as select sql_calc_found_rows * from music where user_id = 1", 602 "plan": { 603 "QueryType": "DDL", 604 "Original": "create view user.view_a as select sql_calc_found_rows * from music where user_id = 1", 605 "Instructions": { 606 "OperatorType": "DDL", 607 "Keyspace": { 608 "Name": "user", 609 "Sharded": true 610 }, 611 "Query": "create view view_a as select * from music where user_id = 1" 612 }, 613 "TablesUsed": [ 614 "user.view_a" 615 ] 616 } 617 }, 618 { 619 "comment": "DDL", 620 "query": "create index a on user(id)", 621 "plan": { 622 "QueryType": "DDL", 623 "Original": "create index a on user(id)", 624 "Instructions": { 625 "OperatorType": "DDL", 626 "Keyspace": { 627 "Name": "user", 628 "Sharded": true 629 }, 630 "Query": "alter table `user` add index a (id)" 631 }, 632 "TablesUsed": [ 633 "user.user" 634 ] 635 } 636 }, 637 { 638 "comment": "Alter table with qualifier", 639 "query": "alter table user ADD id int", 640 "plan": { 641 "QueryType": "DDL", 642 "Original": "alter table user ADD id int", 643 "Instructions": { 644 "OperatorType": "DDL", 645 "Keyspace": { 646 "Name": "user", 647 "Sharded": true 648 }, 649 "Query": "alter table `user` add column id int" 650 }, 651 "TablesUsed": [ 652 "user.user" 653 ] 654 } 655 }, 656 { 657 "comment": "Alter View", 658 "query": "alter view user_extra as select* from user", 659 "plan": { 660 "QueryType": "DDL", 661 "Original": "alter view user_extra as select* from user", 662 "Instructions": { 663 "OperatorType": "DDL", 664 "Keyspace": { 665 "Name": "user", 666 "Sharded": true 667 }, 668 "Query": "alter view user_extra as select * from `user`" 669 }, 670 "TablesUsed": [ 671 "user.user_extra" 672 ] 673 } 674 }, 675 { 676 "comment": "Alter View with unknown view", 677 "query": "alter view unknown as select* from user", 678 "plan": "VT03007: keyspace not specified" 679 }, 680 { 681 "comment": "drop table with qualifier in one", 682 "query": "drop table user.user, user_extra", 683 "plan": { 684 "QueryType": "DDL", 685 "Original": "drop table user.user, user_extra", 686 "Instructions": { 687 "OperatorType": "DDL", 688 "Keyspace": { 689 "Name": "user", 690 "Sharded": true 691 }, 692 "Query": "drop table `user`, user_extra" 693 }, 694 "TablesUsed": [ 695 "user.user", 696 "user.user_extra" 697 ] 698 } 699 }, 700 { 701 "comment": "drop table with incompatible tables", 702 "query": "drop table user, unsharded_a", 703 "plan": "VT12001: unsupported: Tables or Views specified in the query do not belong to the same destination" 704 }, 705 { 706 "comment": "drop table with unknown table", 707 "query": "drop table unknown", 708 "plan": "VT03007: keyspace not specified" 709 }, 710 { 711 "comment": "drop view with 1 view without qualifier", 712 "query": "drop view user.user, user_extra", 713 "plan": { 714 "QueryType": "DDL", 715 "Original": "drop view user.user, user_extra", 716 "Instructions": { 717 "OperatorType": "DDL", 718 "Keyspace": { 719 "Name": "user", 720 "Sharded": true 721 }, 722 "Query": "drop view `user`, user_extra" 723 }, 724 "TablesUsed": [ 725 "user.user", 726 "user.user_extra" 727 ] 728 } 729 }, 730 { 731 "comment": "drop view with incompatible views", 732 "query": "drop view user, unsharded_a", 733 "plan": "VT12001: unsupported: Tables or Views specified in the query do not belong to the same destination" 734 }, 735 { 736 "comment": "drop view with unknown view", 737 "query": "drop view unknown", 738 "plan": "VT03007: keyspace not specified" 739 }, 740 { 741 "comment": "Truncate table without qualifier", 742 "query": "truncate user_extra", 743 "plan": { 744 "QueryType": "DDL", 745 "Original": "truncate user_extra", 746 "Instructions": { 747 "OperatorType": "DDL", 748 "Keyspace": { 749 "Name": "user", 750 "Sharded": true 751 }, 752 "Query": "truncate table user_extra" 753 }, 754 "TablesUsed": [ 755 "user.user_extra" 756 ] 757 } 758 }, 759 { 760 "comment": "Rename table", 761 "query": "rename table user_extra to b", 762 "plan": { 763 "QueryType": "DDL", 764 "Original": "rename table user_extra to b", 765 "Instructions": { 766 "OperatorType": "DDL", 767 "Keyspace": { 768 "Name": "user", 769 "Sharded": true 770 }, 771 "Query": "rename table user_extra to b" 772 }, 773 "TablesUsed": [ 774 "user.b", 775 "user.user_extra" 776 ] 777 } 778 }, 779 { 780 "comment": "Rename table with different keyspace tables", 781 "query": "rename table user_extra to b, main.a to b", 782 "plan": "VT12001: unsupported: Tables or Views specified in the query do not belong to the same destination" 783 }, 784 { 785 "comment": "Rename table with change in keyspace name", 786 "query": "rename table user_extra to main.b", 787 "plan": "VT03002: changing schema from 'user' to 'main' is not allowed" 788 } 789 ]