Skip to content

Conversation

Hugo-WB
Copy link
Contributor

@Hugo-WB Hugo-WB commented Sep 25, 2025

When a custom catalog defined by catalog-impl fails to load, the error is silently caught in Spark3Util::catalogAndIdentifier. This causes confusing downstream errors because it falls back to DEFAULT_CATALOG_NAME (typically HiveCatalog), so users see HiveCatalog errors instead of the actual catalog loading failure.

This change adds logging when catalog loading fails to help users quickly identify catalog configuration issues.

@github-actions github-actions bot added the spark label Sep 25, 2025
@Hugo-WB Hugo-WB force-pushed the spark-log-failed-catalog-load branch from 9a3fb1f to f653605 Compare September 29, 2025 08:27
@Hugo-WB Hugo-WB force-pushed the spark-log-failed-catalog-load branch from f653605 to fbafc15 Compare September 29, 2025 08:28
@Hugo-WB Hugo-WB marked this pull request as ready for review September 29, 2025 08:28
try {
return catalogManager.catalog(catalogName);
} catch (Exception e) {
LOG.warn("Failed to load catalog", e);
Copy link
Contributor

Choose a reason for hiding this comment

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

How about including the catalog name?

LOG.warn("Failed to load catalog: {}", catalogName, e);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done! thanks for the suggestion 🙏

Thanks to ebyhr for suggestion!
@nastra nastra merged commit 6fd5e29 into apache:main Oct 2, 2025
27 checks passed
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.

3 participants