Skip to content

fix(datafusion): add error logging to catalog methods that silently swallow errors#273

Merged
JingsongLi merged 1 commit into
apache:mainfrom
shyjsarah:fix/catalog-error-logging
Apr 22, 2026
Merged

fix(datafusion): add error logging to catalog methods that silently swallow errors#273
JingsongLi merged 1 commit into
apache:mainfrom
shyjsarah:fix/catalog-error-logging

Conversation

@shyjsarah
Copy link
Copy Markdown
Contributor

…wallow errors

The CatalogProvider/SchemaProvider trait methods schema_names(), schema(), table_names(), and table_exist() have no Result return type, so errors from remote catalog operations were silently discarded. Add log::error! to surface these failures for debugging.

Purpose

Linked issue: N/A (no existing issue — upstream trait limitation)

Add log::error! to 4 CatalogProvider/SchemaProvider trait methods that silently discard errors from remote catalog operations, making failures visible for debugging.

Brief change log

  • schema_names(): replace unwrap_or_default() with match + log::error! on Err
  • schema(): replace Err(_) => None with log::error! before returning None
  • table_names(): replace unwrap_or_default() with match + log::error! on Err
  • table_exist(): replace Err(_) => false with log::error! before returning false
  • Add log = "0.4" dependency to paimon-datafusion

These 4 methods have no Result return type in the upstream DataFusion trait, so logging is the best we can do. A proper fix requires changing the upstream trait signatures (to
be proposed separately as a breaking API change on apache/datafusion).

Tests

  • Existing tests pass (cargo test -p paimon-datafusion)
  • Manual: set RUST_LOG=error and trigger a catalog error to verify log output

API and Format

No API or format changes.

Documentation

No documentation changes needed.

…wallow errors

The CatalogProvider/SchemaProvider trait methods schema_names(), schema(),
table_names(), and table_exist() have no Result return type, so errors from
remote catalog operations were silently discarded. Add log::error! to surface
these failures for debugging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

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

+1

@JingsongLi JingsongLi merged commit 9514353 into apache:main Apr 22, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants