io.deephaven.engine.table.impl.by.NullColumnAggregationTransformer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deephaven-engine-table Show documentation
Show all versions of deephaven-engine-table Show documentation
Engine Table: Implementation and closely-coupled utilities
/**
* Copyright (c) 2016-2022 Deephaven Data Labs and Patent Pending
*/
package io.deephaven.engine.table.impl.by;
import io.deephaven.engine.table.ColumnSource;
import io.deephaven.engine.table.impl.sources.NullValueColumnSource;
import org.jetbrains.annotations.NotNull;
import java.util.LinkedHashMap;
import java.util.Map;
class NullColumnAggregationTransformer implements AggregationContextTransformer {
private final Map> resultColumnTypes;
NullColumnAggregationTransformer(@NotNull final Map> resultColumnTypes) {
this.resultColumnTypes = resultColumnTypes;
}
@Override
public void resultColumnFixup(@NotNull final Map> resultColumns) {
final Map> savedColumns = new LinkedHashMap<>(resultColumns);
resultColumns.clear();
resultColumnTypes
.forEach((key, value) -> resultColumns.put(key, NullValueColumnSource.getInstance(value, null)));
resultColumns.putAll(savedColumns);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy