Skip to content

Commit

Permalink
Merge branch 'finos:master' into review-route_vs_rather_than_fe
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelbey committed Dec 18, 2024
2 parents c521872 + 6c5d72e commit ffa49a0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@
</dependency>
<!-- ECLIPSE COLLECTIONS -->

<!-- JACKSON -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<!-- JACKSON -->

<!-- COMMONS CODEC -->
<dependency>
<groupId>commons-codec</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public <T> T accept(ResultVisitor<T> resultVisitor)
return resultVisitor.visit(this);
}

public Object stream() throws IOException
public String stream() throws IOException
{
return ConstantResultHelper.stream(this.getValue());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -51,8 +50,7 @@ public static String doExecute(String jsonPlan, Map<String, Object> 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)
{
Expand All @@ -62,7 +60,7 @@ public static String doExecute(String jsonPlan, Map<String, Object> variables, M
}
else if (result instanceof ConstantResult)
{
return ((ConstantResult) result).stream().toString();
return ((ConstantResult) result).stream();
}
else
{
Expand Down

0 comments on commit ffa49a0

Please sign in to comment.