diff --git a/backend/src/main/java/com/bakdata/conquery/io/storage/NamespaceStorage.java b/backend/src/main/java/com/bakdata/conquery/io/storage/NamespaceStorage.java index 912dc5cba5..3c4e410ba5 100644 --- a/backend/src/main/java/com/bakdata/conquery/io/storage/NamespaceStorage.java +++ b/backend/src/main/java/com/bakdata/conquery/io/storage/NamespaceStorage.java @@ -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; @@ -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 diff --git a/backend/src/main/java/com/bakdata/conquery/io/storage/NamespacedStorage.java b/backend/src/main/java/com/bakdata/conquery/io/storage/NamespacedStorage.java index 1572027196..041e13d122 100644 --- a/backend/src/main/java/com/bakdata/conquery/io/storage/NamespacedStorage.java +++ b/backend/src/main/java/com/bakdata/conquery/io/storage/NamespacedStorage.java @@ -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; diff --git a/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/DistinctSelect.java b/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/DistinctSelect.java index e49c53fe9e..96328c1f88 100644 --- a/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/DistinctSelect.java +++ b/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/DistinctSelect.java @@ -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; @@ -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); } diff --git a/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/FirstValueSelect.java b/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/FirstValueSelect.java index c3c64162e3..3467f58eed 100644 --- a/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/FirstValueSelect.java +++ b/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/FirstValueSelect.java @@ -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; @@ -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); } diff --git a/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/LastValueSelect.java b/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/LastValueSelect.java index a919eecb67..ce86d43e0d 100644 --- a/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/LastValueSelect.java +++ b/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/LastValueSelect.java @@ -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; @@ -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); } diff --git a/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/RandomValueSelect.java b/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/RandomValueSelect.java index 07ecb35deb..16e8db00dc 100644 --- a/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/RandomValueSelect.java +++ b/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/RandomValueSelect.java @@ -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; @@ -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); } diff --git a/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/specific/MappableSingleColumnSelect.java b/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/specific/MappableSingleColumnSelect.java index 53ea06165f..8427893867 100644 --- a/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/specific/MappableSingleColumnSelect.java +++ b/backend/src/main/java/com/bakdata/conquery/models/datasets/concepts/select/connector/specific/MappableSingleColumnSelect.java @@ -29,7 +29,7 @@ public abstract class MappableSingleColumnSelect extends SingleColumnSelect { @JsonIgnore protected final BiFunction mapper; - public MappableSingleColumnSelect(@NsIdRef Column column, + public MappableSingleColumnSelect(Column column, @Nullable InternToExternMapper mapping){ super(column); this.mapping = mapping; diff --git a/backend/src/main/java/com/bakdata/conquery/models/query/resultinfo/SelectResultInfo.java b/backend/src/main/java/com/bakdata/conquery/models/query/resultinfo/SelectResultInfo.java index dc27a4e6aa..38eae81b7c 100644 --- a/backend/src/main/java/com/bakdata/conquery/models/query/resultinfo/SelectResultInfo.java +++ b/backend/src/main/java/com/bakdata/conquery/models/query/resultinfo/SelectResultInfo.java @@ -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(); }