Skip to content

PDP-1273 Added read method for Command#644

Open
rjrudin wants to merge 1 commit into
developfrom
feature/command-read
Open

PDP-1273 Added read method for Command#644
rjrudin wants to merge 1 commit into
developfrom
feature/command-read

Conversation

@rjrudin
Copy link
Copy Markdown
Contributor

@rjrudin rjrudin commented May 22, 2026

For internal use.

Copilot AI review requested due to automatic review settings May 22, 2026 16:23
@rjrudin rjrudin force-pushed the feature/command-read branch from eba375f to 0045f9b Compare May 22, 2026 16:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new read capability to the CLI command abstraction so internal callers can obtain a Spark Dataset<Row> from a command without executing a write/count/preview flow.

Changes:

  • Added a default Command.read(SparkSession) method that throws UnsupportedOperationException by default.
  • Implemented read(SparkSession) in AbstractCommand by delegating to the existing dataset-loading pipeline (readDataset).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
flux-cli/src/main/java/com/marklogic/flux/impl/Command.java Introduces new read method on the command interface (default unsupported).
flux-cli/src/main/java/com/marklogic/flux/impl/AbstractCommand.java Provides a concrete read implementation for commands that already load a dataset.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

*/
void execute(SparkSession session);

default Dataset<Row> read(SparkSession session) throws Exception {
Comment on lines +53 to +54
public Dataset<Row> read(SparkSession session) throws Exception {
return readDataset(session);
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.

3 participants