Skip to content

Commit

Permalink
Check arguments in StageExecutionId, TaskId, StageId,TableWriteInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Akanksha-kedia authored and tdcmeehan committed Dec 15, 2023
1 parent 87688fb commit 93d7a57
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public static StageExecutionId valueOf(List<String> ids)
public StageExecutionId(StageId stageId, int id)
{
this.stageId = requireNonNull(stageId, "stageId is null");
checkArgument(id >= 0, "id is negative: %s", id);
this.id = id;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public static StageId valueOf(List<String> ids)
public StageId(QueryId queryId, int id)
{
this.queryId = requireNonNull(queryId, "queryId is null");
checkArgument(id >= 0, "id is negative: %s", id);
this.id = id;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public TaskId(StageExecutionId stageExecutionId, int id, int attemptNumber)
{
this.stageExecutionId = requireNonNull(stageExecutionId, "stageExecutionId");
this.attemptNumber = attemptNumber;
checkArgument(id >= 0, "id is negative");
checkArgument(id >= 0, "id is negative: %s", id);
this.id = id;
}

Expand Down

0 comments on commit 93d7a57

Please sign in to comment.