Skip to content

Commit

Permalink
Fix SparkSubmitParameterModifier issue (#2837) (#2839)
Browse files Browse the repository at this point in the history
(cherry picked from commit 607354c)

Signed-off-by: Tomoyuki Morita <moritato@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
(cherry picked from commit bebf31a)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Jul 23, 2024
1 parent f7c1f09 commit 0e9cfc0
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 0e9cfc0

Please sign in to comment.