Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented May 30, 2025

What changes were proposed in this pull request?

This PR aims to support executeCommand API of SparkSession.

In addition, DataSourceNotFound is added to SparkConnectError.

Why are the changes needed?

For feature parity.

Does this PR introduce any user-facing change?

No behavior change.

How was this patch tested?

Pass the CIs.

Since Apache Spark distribution has no built-in ExternalCommandRunner. I crafted the following for manual testing. In this PR, the added test case only checks the API invocation part.

$ cat MyCommand.java
public class MyCommand implements org.apache.spark.sql.connector.ExternalCommandRunner {
  @Override
  public String[] executeCommand(String command, org.apache.spark.sql.util.CaseInsensitiveStringMap options) {
    String[] result = {"Hello", command};
    return result;
  }
}

Was this patch authored or co-authored using generative AI tooling?

No.

@dongjoon-hyun
Copy link
Member Author

I'll merge this new API.

@dongjoon-hyun dongjoon-hyun deleted the SPARK-52361 branch May 31, 2025 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant