Skip to content

[MINOR][SS] Use filterNot in HDFSBackedStateStoreProvider snapshot filtering#57519

Open
uros-b wants to merge 1 commit into
apache:masterfrom
uros-b:cleanup-hdfs-state-filternot
Open

[MINOR][SS] Use filterNot in HDFSBackedStateStoreProvider snapshot filtering#57519
uros-b wants to merge 1 commit into
apache:masterfrom
uros-b:cleanup-hdfs-state-filternot

Conversation

@uros-b

@uros-b uros-b commented Jul 25, 2026

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

Replaces filter(_.isSnapshot == false) with the equivalent, idiomatic filterNot(_.isSnapshot) in HDFSBackedStateStoreProvider.doSnapshot.

Why are the changes needed?

StoreFile.isSnapshot is a plain Boolean field, so comparing it to false is redundant. filterNot is the idiomatic form used throughout Spark and reads more clearly.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Behavior-preserving one-line change; existing state-store tests cover the path. No new tests needed.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.8)

@uros-b uros-b left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Waiting for CI

@dongjoon-hyun dongjoon-hyun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1, LGTM.

BTW, if you want to backport this to branch-4.x for Spark 4.3.0, you had better get a new JIRA ID.

Otherwise, this is only for Apache Spark 5.0.0 (master).

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