Skip to content

Conversation

@wendigo
Copy link
Contributor

@wendigo wendigo commented Oct 2, 2025

QueryId was already converted

Description

Additional context and related issues

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

## Section
* Fix some things. ({issue}`issuenumber`)

@wendigo
Copy link
Contributor Author

wendigo commented Oct 2, 2025

@wendigo wendigo force-pushed the serafin/stage-task-query branch from 93aee4c to 820e117 Compare October 2, 2025 11:52
@wendigo wendigo force-pushed the serafin/stage-task-query branch from 820e117 to b2299e9 Compare October 2, 2025 12:05
@wendigo wendigo requested a review from ebyhr October 2, 2025 13:32
@wendigo wendigo merged commit fc20950 into master Oct 2, 2025
207 of 209 checks passed
@wendigo wendigo deleted the serafin/stage-task-query branch October 2, 2025 14:09
@github-actions github-actions bot added this to the 478 milestone Oct 2, 2025
import static java.util.Objects.requireNonNull;

public class TaskId
public record TaskId(String fullId, StageId stageId, int partitionId, int attemptId)
Copy link
Member

Choose a reason for hiding this comment

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

This now exposes a bunch of private fields, so it should not be a record.

Copy link
Contributor Author

@wendigo wendigo Oct 2, 2025

Choose a reason for hiding this comment

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

Except for fullId all of these fields were accessed through the corresponding getters:

    public StageId getStageId()
    {
        return stageId;
    }

    public int getPartitionId()
    {
        return partitionId;
    }

    public int getAttemptId()
    {
        return attemptId;
    }

I don't see how accessing fullId() which you can anyway get through toString() breaks encapsulation. All of these fields were accessible externally through the previously exposed API

Copy link
Member

Choose a reason for hiding this comment

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

It does break encapsulation because it allows TaskId to be constructed with stageId/partitionId/attemptId that don't agree with fullId

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants