Commit 09d2765
[SPARK-53045][SQL] DESCRIBE EXTENDED should be resilient to corrupt metadata
### What changes were proposed in this pull request?
A lot of methods called by DESCRIBE EXTENDED can throw exception if the CatalotTable metadata is not a certain way, in particular in the case of view which has strict requirements.
This proposes to make DESCRIBE EXTENDED and CatalogTable.toString still able to return successfully in this case.
### Why are the changes needed?
We see some issue where somehow there is some leftover View metadata on a table, and DESC EXTENDED and jobs attempting to call toString on the table both crash, even if the table is not a view
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Existing unit test
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #51753 from szehon-ho/view_query_output_cols.
Authored-by: Szehon Ho <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>1 parent c9b85a2 commit 09d2765
File tree
1 file changed
+30
-25
lines changed- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog
1 file changed
+30
-25
lines changedLines changed: 30 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
629 | 630 | | |
630 | 631 | | |
631 | 632 | | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | 633 | | |
643 | 634 | | |
644 | 635 | | |
| |||
655 | 646 | | |
656 | 647 | | |
657 | 648 | | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
673 | 678 | | |
674 | 679 | | |
675 | 680 | | |
| |||
0 commit comments