From b89d763476eab560bd80e9a0528088122b88c8b7 Mon Sep 17 00:00:00 2001
From: AFine-gs <69924417+AFine-gs@users.noreply.github.com>
Date: Wed, 2 Oct 2024 11:52:49 -0400
Subject: [PATCH] add tdsAggregateValue to grammar composer (#3145)
---
.../pure/grammar/to/DEPRECATED_PureGrammarComposerCore.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/legend-engine-core/legend-engine-core-base/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/DEPRECATED_PureGrammarComposerCore.java b/legend-engine-core/legend-engine-core-base/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/DEPRECATED_PureGrammarComposerCore.java
index 35128222686..fa02df963c8 100644
--- a/legend-engine-core/legend-engine-core-base/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/DEPRECATED_PureGrammarComposerCore.java
+++ b/legend-engine-core/legend-engine-core-base/legend-engine-core-language-pure/legend-engine-language-pure-grammar/src/main/java/org/finos/legend/engine/language/pure/grammar/to/DEPRECATED_PureGrammarComposerCore.java
@@ -89,6 +89,7 @@
import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.Whatever;
import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.classInstance.AggregateValue;
import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.classInstance.PureList;
+import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.classInstance.TDSAggregateValue;
import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.classInstance.TdsOlapAggregation;
import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.classInstance.TdsOlapRank;
import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.classInstance.graph.GraphFetchTree;
@@ -741,6 +742,10 @@ public String visit(ClassInstance iv)
case "tdsOlapAggregation":
TdsOlapAggregation tdsOlapAggregation = (TdsOlapAggregation) iv.value;
return (this.isRenderingHTML() ? "" : "") + "olapGroupBy" + (this.isRenderingHTML() ? "" : "") + "(" + tdsOlapAggregation.function.accept(this) + ")";
+ case "tdsAggregateValue":
+ TDSAggregateValue tdsAggregateValue = (TDSAggregateValue) iv.value;
+ return (this.isRenderingHTML() ? "" : "") + "agg" + (this.isRenderingHTML() ? "" : "") + "(" + convertString(tdsAggregateValue.name,true) + "," + tdsAggregateValue.mapFn.accept(this) + ", " + tdsAggregateValue.aggregateFn.accept(this) + ")";
+
default:
PureGrammarComposerContext context = this.toContext();
Function2