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 <[email protected]>
(cherry picked from commit 607354c)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Jul 17, 2024
1 parent 8856f85 commit 64fcc83
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 64fcc83

Please sign in to comment.