Skip to content

Conversation

@szehon-ho
Copy link
Member

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

@github-actions github-actions bot added the SQL label Jul 31, 2025
@szehon-ho szehon-ho force-pushed the view_query_output_cols branch from 705ec6a to 2dbd5e3 Compare July 31, 2025 19:40
import org.apache.spark.sql.connector.catalog.CatalogV2Implicits._
map += "View Catalog and Namespace" -> JString(viewCatalogAndNamespaceInfos.quoted)
}
val viewQueryOutputColumns: JValue = Try {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use standard try-catch and swallow NonFatal errors?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, doesn't Try do that (catch only NonFatal, ie https://github.com/scala/scala/blob/v2.13.2/src/library/scala/util/Try.scala#L204) not sure i miss something

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM.

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in 09d2765 Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants