All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.deephaven.engine.table.impl.by.ssmcountdistinct.BucketSsmDistinctContext Maven / Gradle / Ivy

There is a newer version: 0.37.1
Show newest version
/**
 * 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.engine.table.impl.by.IterativeChunkedAggregationOperator;
import io.deephaven.chunk.*;

public class BucketSsmDistinctContext extends SsmDistinctContext
        implements IterativeChunkedAggregationOperator.BucketedContext {
    public final WritableIntChunk lengthCopy;
    public final ResettableWritableChunk valueResettable;
    public final ResettableWritableIntChunk countResettable;
    public final WritableBooleanChunk ssmsToMaybeClear;

    public BucketSsmDistinctContext(ChunkType chunkType, int size) {
        super(chunkType, size);
        lengthCopy = WritableIntChunk.makeWritableChunk(size);
        valueResettable = chunkType.makeResettableWritableChunk();
        countResettable = ResettableWritableIntChunk.makeResettableChunk();
        ssmsToMaybeClear = WritableBooleanChunk.makeWritableChunk(size);
    }

    @Override
    public void close() {
        super.close();
        lengthCopy.close();
        valueResettable.close();
        countResettable.close();
        ssmsToMaybeClear.close();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy