Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ public void validateCommandLineOptions(CommandLine.ParseResult parseResult) {
new ConnectionParamsValidator(false).validate(connectionParams);
}

@Override
public Dataset<Row> read(SparkSession session) throws Exception {
return readDataset(session);
Comment on lines +53 to +54
}

@Override
public final void execute(SparkSession session) {
try {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/*
* Copyright (c) 2024-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
* Copyright (c) 2024-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
*/
package com.marklogic.flux.impl;

import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
import org.apache.spark.sql.SparkSession;
import picocli.CommandLine;

Expand All @@ -13,6 +15,10 @@ public interface Command {
*/
void execute(SparkSession session);

default Dataset<Row> read(SparkSession session) throws Exception {
throw new UnsupportedOperationException("read is not supported for this command");
}

/**
* With picocli, we don't have a JCommander-like facility for validating all the params before the command is
* executed. This allows us to do that.
Expand Down
Loading