Skip to content

[Spark] Provide default implementations for SnapshotDescriptor.dataPath, numDeltaFiles, and totalDeltaFilesByteSize#7086

Open
huan233usc wants to merge 1 commit into
delta-io:masterfrom
huan233usc:snapshot-descriptor-throw-defaults
Open

[Spark] Provide default implementations for SnapshotDescriptor.dataPath, numDeltaFiles, and totalDeltaFilesByteSize#7086
huan233usc wants to merge 1 commit into
delta-io:masterfrom
huan233usc:snapshot-descriptor-throw-defaults

Conversation

@huan233usc

Copy link
Copy Markdown
Collaborator

Description

SnapshotDescriptor declared dataPath as an abstract member, requiring every implementor to define it. This change makes dataPath a default implementation that throws UnsupportedOperationException, and adds numDeltaFiles and totalDeltaFilesByteSize as members with the same default.

Implementors that can supply these values override them; those that cannot no longer need stub overrides. The two inline SnapshotDescriptor instances that define dataPath (DeltaSource.readSnapshotDescriptor and DeltaSharingUtils) now mark it as an override, since the trait member is no longer abstract.

How was this patch tested?

Existing tests. This refactors trait member declarations; the throw-default bodies preserve behavior for callers that already implement these members.

Does this PR introduce any user-facing changes?

No.

…th, numDeltaFiles, and totalDeltaFilesByteSize

SnapshotDescriptor previously declared dataPath as an abstract member, requiring every implementor to define it. Make dataPath a default implementation that throws UnsupportedOperationException, and add numDeltaFiles and totalDeltaFilesByteSize as members with the same default.

Implementors that can supply these values override them; those that cannot no longer need stub overrides. The two inline descriptors that define dataPath now mark it as an override since the trait member is no longer abstract.
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.

1 participant