Skip to content

Conversation

@sryza
Copy link
Contributor

@sryza sryza commented Nov 17, 2025

What changes were proposed in this pull request?

Followups from #53070 to improve code clarity.

Why are the changes needed?

Make sure the code for constructing SDP checkpoint directory paths is clear.

Does this PR introduce any user-facing change?

No

How was this patch tested?

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

@github-actions github-actions bot added the SQL label Nov 17, 2025
@dongjoon-hyun dongjoon-hyun changed the title [SPARK-54358][SDP] Code clarity followups [SPARK-54358][SDP][FOLLOWUP] Code clarity followups Nov 17, 2025
/**
* Converts a TableIdentifier to a path string by joining its name parts with the path separator.
*/
private def tableIdentifierToPathString(tableIdentifier: TableIdentifier): String = {
Copy link
Member

Choose a reason for hiding this comment

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

Please fix the corresponding test case to use this method too.

val tableId = t.identifier.nameParts.mkString(Path.SEPARATOR)

Copy link
Contributor Author

@sryza sryza Nov 19, 2025

Choose a reason for hiding this comment

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

In general, SystemMetadataSuite reimplements the path construction logic rather than relying on methods in SystemMetadata, to ensure that we'll catch any changes to the behavior if those methods change.

So my inclination is to avoid reusing this helper there for that reason, but I don't mind changing it if you feel strongly.

@dongjoon-hyun
Copy link
Member

dongjoon-hyun commented Nov 17, 2025

FYI, @sryza . For the follow-up PRs, the Apache Spark community uses [FOLLOWUP] in the title instead of saying like Code clarity followups. I added it for you.

As a result, you had better revise the remaining PR title, Code clarity followups, more specifically.

@sryza sryza changed the title [SPARK-54358][SDP][FOLLOWUP] Code clarity followups [SPARK-54358][SDP][FOLLOWUP] Improve code clarity of SDP checkpoint path construction Nov 19, 2025
@dongjoon-hyun dongjoon-hyun changed the title [SPARK-54358][SDP][FOLLOWUP] Improve code clarity of SDP checkpoint path construction [SPARK-54358][SDP][FOLLOWUP] Use tableIdentifierToPathString always for SDP checkpoint path construction Nov 20, 2025
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM. Thank you, @sryza and @HyukjinKwon .
Merged to master/4.1 for Apache Spark 4.1.0.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-54358][SDP][FOLLOWUP] Use tableIdentifierToPathString always for SDP checkpoint path construction [SPARK-54358][SDP][FOLLOWUP] Add tableIdentifierToPathString helper method for SDP checkpoint path construction Nov 20, 2025
dongjoon-hyun pushed a commit that referenced this pull request Nov 20, 2025
… method for SDP checkpoint path construction

### What changes were proposed in this pull request?

Followups from #53070 to improve code clarity.

### Why are the changes needed?

Make sure the code for constructing SDP checkpoint directory paths is clear.

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

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

Closes #53089 from sryza/collide-followups.

Authored-by: Sandy Ryza <sandy.ryza@databricks.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
(cherry picked from commit 10d1b4c)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
huangxiaopingRD pushed a commit to huangxiaopingRD/spark that referenced this pull request Nov 25, 2025
… method for SDP checkpoint path construction

### What changes were proposed in this pull request?

Followups from apache#53070 to improve code clarity.

### Why are the changes needed?

Make sure the code for constructing SDP checkpoint directory paths is clear.

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

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

Closes apache#53089 from sryza/collide-followups.

Authored-by: Sandy Ryza <sandy.ryza@databricks.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants