Skip to content

Commit

Permalink
Merge pull request #2581 from bakdata/master
Browse files Browse the repository at this point in the history
Reintegrate Master
  • Loading branch information
awildturtok authored Jul 5, 2022
2 parents 7aeb590 + 289479c commit c729d81
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.bakdata.conquery.ConqueryConstants;
import com.bakdata.conquery.io.storage.xodus.stores.SingletonStore;
import com.bakdata.conquery.models.config.StoreFactory;
import com.bakdata.conquery.models.datasets.Dataset;
import com.bakdata.conquery.models.datasets.concepts.StructureNode;
import com.bakdata.conquery.models.dictionary.Dictionary;
import com.bakdata.conquery.models.dictionary.EncodedDictionary;
Expand Down Expand Up @@ -83,13 +82,23 @@ public void openStores(ObjectMapper objectMapper) {

@Override
public void loadData() {
super.loadData();
dataset.loadData();
secondaryIds.loadData();
tables.loadData();
dictionaries.loadData();
imports.loadData();

internToExternMappers.loadData();
// Concepts depend on internToExternMappers
concepts.loadData();

idMapping.loadData();
structure.loadData();
workerToBuckets.loadData();
primaryDictionary.loadData();

log.info("Done reading {} / {}", dataset.get(), getClass().getName());

}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import com.bakdata.conquery.models.identifiable.ids.specific.ImportId;
import com.bakdata.conquery.models.identifiable.ids.specific.SecondaryIdDescriptionId;
import com.bakdata.conquery.models.identifiable.ids.specific.TableId;
import com.bakdata.conquery.models.index.InternToExternMapper;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Getter;
import lombok.SneakyThrows;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.bakdata.conquery.io.cps.CPSType;
import com.bakdata.conquery.io.jackson.serializer.NsIdRef;
import com.bakdata.conquery.io.jackson.serializer.SerdesTarget;
import com.bakdata.conquery.models.datasets.Column;
import com.bakdata.conquery.models.datasets.concepts.select.Select;
import com.bakdata.conquery.models.datasets.concepts.select.connector.specific.MappableSingleColumnSelect;
Expand All @@ -16,7 +17,7 @@ public class DistinctSelect extends MappableSingleColumnSelect {

@JsonCreator
public DistinctSelect(@NsIdRef Column column,
@NsIdRef InternToExternMapper mapping) {
@NsIdRef(serdesTarget = SerdesTarget.MANAGER) InternToExternMapper mapping) {
super(column, mapping);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import com.bakdata.conquery.io.cps.CPSType;
import com.bakdata.conquery.io.jackson.serializer.NsIdRef;
import com.bakdata.conquery.io.jackson.serializer.SerdesTarget;
import com.bakdata.conquery.models.datasets.Column;
import com.bakdata.conquery.models.datasets.concepts.select.Select;
import com.bakdata.conquery.models.datasets.concepts.select.connector.specific.MappableSingleColumnSelect;
import com.bakdata.conquery.models.index.InternToExternMapper;
import com.bakdata.conquery.models.index.MapInternToExternMapper;
import com.bakdata.conquery.models.query.queryplan.aggregators.Aggregator;
import com.bakdata.conquery.models.query.queryplan.aggregators.specific.value.FirstValueAggregator;
import com.fasterxml.jackson.annotation.JsonCreator;
Expand All @@ -16,7 +16,7 @@ public class FirstValueSelect extends MappableSingleColumnSelect {

@JsonCreator
public FirstValueSelect(@NsIdRef Column column,
@NsIdRef InternToExternMapper mapping) {
@NsIdRef(serdesTarget = SerdesTarget.MANAGER) InternToExternMapper mapping) {
super(column, mapping);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package com.bakdata.conquery.models.datasets.concepts.select.connector;

import javax.annotation.Nullable;

import com.bakdata.conquery.io.cps.CPSType;
import com.bakdata.conquery.io.jackson.serializer.NsIdRef;
import com.bakdata.conquery.models.datasets.concepts.select.Select;
import com.bakdata.conquery.io.jackson.serializer.SerdesTarget;
import com.bakdata.conquery.models.datasets.Column;
import com.bakdata.conquery.models.datasets.concepts.select.Select;
import com.bakdata.conquery.models.datasets.concepts.select.connector.specific.MappableSingleColumnSelect;
import com.bakdata.conquery.models.index.InternToExternMapper;
import com.bakdata.conquery.models.query.queryplan.aggregators.Aggregator;
Expand All @@ -17,7 +16,7 @@ public class LastValueSelect extends MappableSingleColumnSelect {

@JsonCreator
public LastValueSelect(@NsIdRef Column column,
@Nullable InternToExternMapper mapping) {
@NsIdRef(serdesTarget = SerdesTarget.MANAGER) InternToExternMapper mapping) {
super(column, mapping);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package com.bakdata.conquery.models.datasets.concepts.select.connector;

import javax.annotation.Nullable;

import com.bakdata.conquery.io.cps.CPSType;
import com.bakdata.conquery.io.jackson.serializer.NsIdRef;
import com.bakdata.conquery.models.datasets.concepts.select.Select;
import com.bakdata.conquery.io.jackson.serializer.SerdesTarget;
import com.bakdata.conquery.models.datasets.Column;
import com.bakdata.conquery.models.datasets.concepts.select.Select;
import com.bakdata.conquery.models.datasets.concepts.select.connector.specific.MappableSingleColumnSelect;
import com.bakdata.conquery.models.index.InternToExternMapper;
import com.bakdata.conquery.models.query.queryplan.aggregators.Aggregator;
Expand All @@ -16,7 +15,7 @@
public class RandomValueSelect extends MappableSingleColumnSelect {
@JsonCreator
public RandomValueSelect(@NsIdRef Column column,
@NsIdRef InternToExternMapper mapping) {
@NsIdRef(serdesTarget = SerdesTarget.MANAGER) InternToExternMapper mapping) {
super(column, mapping);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public abstract class MappableSingleColumnSelect extends SingleColumnSelect {
@JsonIgnore
protected final BiFunction<Object, PrintSettings, String> mapper;

public MappableSingleColumnSelect(@NsIdRef Column column,
public MappableSingleColumnSelect(Column column,
@Nullable InternToExternMapper mapping){
super(column);
this.mapping = mapping;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ public ColumnDescriptor asColumnDescriptor(PrintSettings settings, UniqueNamer u
.defaultLabel(defaultColumnName(settings))
.userConceptLabel(userColumnName(settings))
.type(getType().typeInfo())
.selectId(select.getId())
.semantics(getSemantics())
.selectId(select.getId()) // TODO delete this?
.build();
}

Expand Down

0 comments on commit c729d81

Please sign in to comment.