Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require Debug for DataSource #14882

Merged
merged 3 commits into from
Feb 26, 2025
Merged

Require Debug for DataSource #14882

merged 3 commits into from
Feb 26, 2025

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Feb 25, 2025

Which issue does this PR close?

Part of

This is a follow on / fallout of

Rationale for this change

When working on upgrading delta-rs to use the new DataSourceExec I was debugging something and all that is shown is like this

Source: DataSource:

I want to be able to see what DataSource it is so I can debug it properly

What changes are included in this PR?

  1. Require Debug for DataSource

Are these changes tested?

By CI

Are there any user-facing changes?

Better debug ability

I have more improvements planned in this area too as I work through the delta upgrade

@@ -35,7 +35,7 @@ use datafusion_physical_expr_common::sort_expr::LexOrdering;

/// Common behaviors in Data Sources for both from Files and Memory.
/// See `DataSourceExec` for physical plan implementation
pub trait DataSource: Send + Sync {
pub trait DataSource: Send + Sync + Debug {
Copy link
Contributor Author

@alamb alamb Feb 25, 2025

Choose a reason for hiding this comment

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

this means that anything that implements DataSource must also implement Debug

This trait was introduced in

And thus has not yet been released yet and thus is not a breaking change

Copy link
Contributor

@m09526 m09526 left a comment

Choose a reason for hiding this comment

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

Looks good.

@@ -35,7 +35,7 @@ use datafusion_physical_expr_common::sort_expr::LexOrdering;

/// Common behaviors in Data Sources for both from Files and Memory.
/// See `DataSourceExec` for physical plan implementation
pub trait DataSource: Send + Sync {
pub trait DataSource: Send + Sync + Debug {
Copy link
Contributor

Choose a reason for hiding this comment

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

probably we can comment why Debug is required? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a note in a5dbaca-- the real reason is to help standard debugging.

Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

lgtm thanks @alamb

@alamb alamb merged commit d47f7fb into apache:main Feb 26, 2025
24 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.

3 participants