Skip to content

Commit

Permalink
change resolved to asIds.
Browse files Browse the repository at this point in the history
  • Loading branch information
awildturtok committed Aug 2, 2022
1 parent 8d11f88 commit 7bd1788
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.bakdata.conquery.models.datasets.concepts.select.concept;

import com.bakdata.conquery.io.cps.CPSType;
import com.bakdata.conquery.models.datasets.concepts.ConceptElement;
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;
Expand All @@ -10,16 +11,21 @@
import io.dropwizard.validation.ValidationMethod;
import lombok.Data;

/**
* Select to extract the values used to build a {@link TreeConcept}.
*/
@CPSType(id = "CONCEPT_VALUES", base = Select.class)
@Data
public class ConceptColumnSelect extends UniversalSelect {

private boolean resolved = false;

/**
* If true, values are returned as resolved {@link ConceptElement#getLabel()} instead of the actual values.
*/
private boolean asIds = false;

@Override
public Aggregator<?> createAggregator() {
if(resolved){
if(isAsIds()){
return new ConceptElementsAggregator(((TreeConcept) getHolder().findConcept()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{
"type" : "CONCEPT_VALUES",
"name" : "select",
"resolved" : false
"asIds" : false
}
],
"connectors": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{
"type" : "CONCEPT_VALUES",
"name" : "select",
"resolved" : true
"asIds" : true
}
],
"connectors": [
Expand Down

0 comments on commit 7bd1788

Please sign in to comment.