io.deephaven.engine.table.impl.by.ssmcountdistinct.SsmDistinctContext 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.ssmcountdistinct;
import io.deephaven.chunk.attributes.ChunkLengths;
import io.deephaven.chunk.attributes.Values;
import io.deephaven.configuration.Configuration;
import io.deephaven.engine.table.impl.by.IterativeChunkedAggregationOperator;
import io.deephaven.chunk.ChunkType;
import io.deephaven.chunk.WritableChunk;
import io.deephaven.chunk.WritableIntChunk;
import io.deephaven.engine.table.impl.ssms.SegmentedSortedMultiSet;
public class SsmDistinctContext implements IterativeChunkedAggregationOperator.SingletonContext {
public static final int NODE_SIZE =
Configuration.getInstance().getIntegerWithDefault("SsmDistinctContext.nodeSize", 4096);
public final SegmentedSortedMultiSet.RemoveContext removeContext =
SegmentedSortedMultiSet.makeRemoveContext(NODE_SIZE);
public final WritableChunk valueCopy;
public final WritableIntChunk counts;
public SsmDistinctContext(ChunkType chunkType, int size) {
valueCopy = chunkType.makeWritableChunk(size);
counts = WritableIntChunk.makeWritableChunk(size);
}
@Override
public void close() {
valueCopy.close();
counts.close();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy