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

make actions types pub(crate) #405

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zachschuermann
Copy link
Collaborator

@zachschuermann zachschuermann commented Oct 17, 2024

Probably don't want to just have all actions pub. Opening a PR to iterate/discuss what we want to make pub(crate). Looks like consumers of the actions themselves are (non-exhaustive):

  • Snapshot directly embeds Protocol and Metadata and has getters for each
  • inspect_table has the ability to print each action via visiting the action
  • probably many more

Copy link

codecov bot commented Oct 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.38%. Comparing base (025aba8) to head (2eea225).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #405      +/-   ##
==========================================
+ Coverage   78.34%   78.38%   +0.04%     
==========================================
  Files          49       49              
  Lines       10282    10280       -2     
  Branches    10282    10280       -2     
==========================================
+ Hits         8055     8058       +3     
+ Misses       1775     1770       -5     
  Partials      452      452              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added the breaking-change Change that will require a version bump label Oct 17, 2024
Copy link
Collaborator

@scovich scovich left a comment

Choose a reason for hiding this comment

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

LGTM.

I do wish there were a way to attach visibility:make to struct fields tho. Otherwise we have to decide between the fields being inaccessible to users under developer-visibility, or getting flagged as unreachable-public the rest of the time.

let mut visitor = MetadataVisitor::default();
data.extract(get_log_schema().project(&[METADATA_NAME])?, &mut visitor)?;
Ok(visitor.metadata)
}

pub fn schema(&self) -> DeltaResult<StructType> {
pub(crate) fn schema(&self) -> DeltaResult<StructType> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this need to be public under developer-visibility? Or is the schema from snapshot enough?
(similar question for reader/writer feature lists in Protocol below)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Honestly I think this just comes down to semantics/what we want to expose? Do we want to make users understand Metadata actions or should we just keep the schema as part of snapshot? Perhaps we just try to constrain for now (snapshot only) and open it back up if needed?

Copy link
Collaborator

Choose a reason for hiding this comment

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

SGTM!

@zachschuermann zachschuermann changed the title [wip] make actions private make actions types pub(crate) Oct 18, 2024
Copy link
Collaborator

@hntd187 hntd187 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 here

@zachschuermann zachschuermann added the merge hold Don't allow the PR to merge label Oct 22, 2024
@zachschuermann
Copy link
Collaborator Author

Need to see how much of this interface delta-rs is consuming - will report back but for now let's hold off

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Change that will require a version bump merge hold Don't allow the PR to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants