From cb0c9f8dc81e55bdc5f6bf96666ee0466d1a577b Mon Sep 17 00:00:00 2001 From: Rafael Bey <24432403+rafaelbey@users.noreply.github.com> Date: Wed, 7 Feb 2024 07:57:25 -0500 Subject: [PATCH] Update PrimitiveValueSpecificationToObjectVisitor.java (#2615) --- .../PrimitiveValueSpecificationToObjectVisitor.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/planHelper/PrimitiveValueSpecificationToObjectVisitor.java b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/planHelper/PrimitiveValueSpecificationToObjectVisitor.java index e46e38e193b..f9696e0815d 100644 --- a/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/planHelper/PrimitiveValueSpecificationToObjectVisitor.java +++ b/legend-engine-core/legend-engine-core-executionPlan-execution/legend-engine-executionPlan-execution/src/main/java/org/finos/legend/engine/plan/execution/planHelper/PrimitiveValueSpecificationToObjectVisitor.java @@ -46,6 +46,7 @@ import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.UnitInstance; import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.UnitType; import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.Whatever; +import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.classInstance.PureList; import java.io.ByteArrayInputStream; @@ -132,7 +133,15 @@ public Object visit(EnumValue enumValue) @Override public Object visit(ClassInstance iv) { - return iv.value; + switch (iv.type) + { + case "listInstance": + return ListIterate.collect(((PureList) iv.value).values, x -> x.accept(this)); + case "path": + return iv.value; + default: + throw new UnsupportedOperationException("Unsupported ClassInstance type: " + iv.type); + } } @Override