Skip to content

Commit

Permalink
Fix SparkSubmitParameterModifier issue (#2837)
Browse files Browse the repository at this point in the history
Signed-off-by: Tomoyuki Morita <moritato@amazon.com>
  • Loading branch information
ykmr1224 committed Jul 17, 2024
1 parent a6394cd commit 607354c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ public SparkSubmitParametersBuilder sessionExecution(String sessionId, String da
}

public SparkSubmitParametersBuilder acceptModifier(SparkSubmitParameterModifier modifier) {
modifier.modifyParameters(this);
if (modifier != null) {
modifier.modifyParameters(this);
}
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ public void testAcceptModifier() {
verify(sparkSubmitParameterModifier).modifyParameters(sparkSubmitParametersBuilder);
}

@Test
public void testAcceptNullModifier() {
sparkSubmitParametersBuilder.acceptModifier(null);
}

@Test
public void testDataSource() {
when(sparkParameterComposerCollection.isComposerRegistered(DataSourceType.S3GLUE))
Expand Down

0 comments on commit 607354c

Please sign in to comment.