From e86fbea190aee9f4b7cdcff7d68fc93399e5c7ee Mon Sep 17 00:00:00 2001 From: awildturtok <1553491+awildturtok@users.noreply.github.com> Date: Thu, 14 Jul 2022 15:47:50 +0200 Subject: [PATCH] also add unresolved mode to ConceptColumnSelect --- .../select/concept/ConceptColumnSelect.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/concept/ConceptColumnSelect.java b/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/concept/ConceptColumnSelect.java index 0e5896b6628..5a9df803b09 100644 --- a/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/concept/ConceptColumnSelect.java +++ b/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/concept/ConceptColumnSelect.java @@ -1,15 +1,11 @@ package com.bakdata.conquery.models.datasets.concepts.select.concept; -import java.util.Set; - -import com.bakdata.conquery.apiv1.query.concept.specific.CQConcept; import com.bakdata.conquery.io.cps.CPSType; import com.bakdata.conquery.models.datasets.concepts.select.Select; import com.bakdata.conquery.models.datasets.concepts.tree.TreeConcept; import com.bakdata.conquery.models.query.queryplan.aggregators.Aggregator; import com.bakdata.conquery.models.query.queryplan.aggregators.specific.value.ConceptElementsAggregator; -import com.bakdata.conquery.models.query.resultinfo.SelectResultInfo; -import com.bakdata.conquery.models.types.SemanticType; +import com.bakdata.conquery.models.query.queryplan.aggregators.specific.value.ConceptValuesAggregator; import com.fasterxml.jackson.annotation.JsonBackReference; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Setter; @@ -17,6 +13,8 @@ @CPSType(id = "CONCEPT_VALUES", base = Select.class) public class ConceptColumnSelect extends Select { + private boolean resolved = false; + @JsonBackReference @JsonIgnore @Setter @@ -24,12 +22,13 @@ public class ConceptColumnSelect extends Select { @Override public Aggregator createAggregator() { - return new ConceptElementsAggregator(concept); - } + if(resolved){ + return new ConceptElementsAggregator(concept); + } - @Override - public SelectResultInfo getResultInfo(CQConcept cqConcept) { - return new SelectResultInfo(this, cqConcept, Set.of(new SemanticType.ConceptColumnT(concept))); + return new ConceptValuesAggregator(concept); } + + }