diff --git a/legend-engine-core/legend-engine-core-base/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-dependencies/pom.xml b/legend-engine-core/legend-engine-core-base/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-dependencies/pom.xml index 747ee1ab75d..4ab6519c521 100644 --- a/legend-engine-core/legend-engine-core-base/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-dependencies/pom.xml +++ b/legend-engine-core/legend-engine-core-base/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-dependencies/pom.xml @@ -52,6 +52,17 @@ + + + com.fasterxml.jackson.core + jackson-annotations + + + com.fasterxml.jackson.core + jackson-databind + + + commons-codec diff --git a/legend-engine-core/legend-engine-core-base/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/result/ConstantResult.java b/legend-engine-core/legend-engine-core-base/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/result/ConstantResult.java index 7c76c29ec75..4cff5899d37 100644 --- a/legend-engine-core/legend-engine-core-base/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/result/ConstantResult.java +++ b/legend-engine-core/legend-engine-core-base/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/result/ConstantResult.java @@ -35,7 +35,7 @@ public T accept(ResultVisitor resultVisitor) return resultVisitor.visit(this); } - public Object stream() throws IOException + public String stream() throws IOException { return ConstantResultHelper.stream(this.getValue()); } diff --git a/legend-engine-pure/legend-engine-pure-runtime/legend-engine-pure-runtime-planExecution/legend-engine-pure-runtime-java-extension-shared-functions-planExecution/src/main/java/org/finos/legend/engine/pure/runtime/execution/shared/LegendExecute.java b/legend-engine-pure/legend-engine-pure-runtime/legend-engine-pure-runtime-planExecution/legend-engine-pure-runtime-java-extension-shared-functions-planExecution/src/main/java/org/finos/legend/engine/pure/runtime/execution/shared/LegendExecute.java index f2d37980677..3f8cd06964f 100644 --- a/legend-engine-pure/legend-engine-pure-runtime/legend-engine-pure-runtime-planExecution/legend-engine-pure-runtime-java-extension-shared-functions-planExecution/src/main/java/org/finos/legend/engine/pure/runtime/execution/shared/LegendExecute.java +++ b/legend-engine-pure/legend-engine-pure-runtime/legend-engine-pure-runtime-planExecution/legend-engine-pure-runtime-java-extension-shared-functions-planExecution/src/main/java/org/finos/legend/engine/pure/runtime/execution/shared/LegendExecute.java @@ -21,7 +21,6 @@ import org.finos.legend.engine.plan.execution.result.StreamingResult; import org.finos.legend.engine.plan.execution.result.serialization.SerializationFormat; import org.finos.legend.engine.shared.core.identity.Identity; -import org.finos.legend.engine.shared.core.identity.factory.IdentityFactory; import org.finos.legend.engine.shared.core.kerberos.SubjectTools; import org.finos.legend.pure.m3.exception.PureExecutionException; import org.finos.legend.pure.m4.coreinstance.CoreInstance; @@ -51,8 +50,7 @@ public static String doExecute(String jsonPlan, Map variables, M .build(); // execute plan - Result result = planExecutor.executeWithArgs(executeArgs); - try (AutoCloseable ignore = result::close) + try (Result result = planExecutor.executeWithArgs(executeArgs)) { if (result instanceof StreamingResult) { @@ -62,7 +60,7 @@ public static String doExecute(String jsonPlan, Map variables, M } else if (result instanceof ConstantResult) { - return ((ConstantResult) result).stream().toString(); + return ((ConstantResult) result).stream(); } else {