Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions internal/pkg/object/command/sparkeks/sparkeks.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ type sparkEksJobContext struct {
Query string `yaml:"query,omitempty" json:"query,omitempty"`
Parameters *sparkEksJobParameters `yaml:"parameters,omitempty" json:"parameters,omitempty"`
ReturnResult bool `yaml:"return_result,omitempty" json:"return_result,omitempty"`
Arguments []string `yaml:"arguments,omitempty" json:"arguments,omitempty"`
}

type sparkEksClusterContext struct {
Expand Down Expand Up @@ -599,6 +600,10 @@ func applySparkOperatorConfig(execCtx *executionContext) {
mainAppFile := s3aWrapperURI
if jobContext.ReturnResult {
sparkApp.Spec.Arguments = []string{execCtx.appName, s3aQueryURI, execCtx.job.User, s3aResultURI}
} else if len(jobContext.Arguments) > 0 {
Copy link
Contributor

@hladush hladush Oct 6, 2025

Choose a reason for hiding this comment

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

what if ReturnResult true and Arguments are provided? what should be happened?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please check now

args := []string{execCtx.appName, execCtx.job.User}
args = append(args, jobContext.Arguments...)
sparkApp.Spec.Arguments = args
} else {
sparkApp.Spec.Arguments = []string{execCtx.appName, s3aQueryURI, execCtx.job.User}
}
Expand Down