Skip to content

Commit

Permalink
also add unresolved mode to ConceptColumnSelect
Browse files Browse the repository at this point in the history
  • Loading branch information
awildturtok committed Jul 14, 2022
1 parent b71635f commit e86fbea
Showing 1 changed file with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
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;

@CPSType(id = "CONCEPT_VALUES", base = Select.class)
public class ConceptColumnSelect extends Select {

private boolean resolved = false;

@JsonBackReference
@JsonIgnore
@Setter
private TreeConcept concept;

@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);
}



}

0 comments on commit e86fbea

Please sign in to comment.