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

io.deephaven.engine.table.impl.by.ssmcountdistinct.BucketSsmDistinctRollupContext 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.ChunkPositions;
import io.deephaven.chunk.attributes.Values;
import io.deephaven.engine.table.impl.by.IterativeChunkedAggregationOperator;
import io.deephaven.chunk.*;

public class BucketSsmDistinctRollupContext extends SsmDistinctRollupContext
        implements IterativeChunkedAggregationOperator.BucketedContext {
    public final WritableIntChunk lengthCopy;
    final WritableIntChunk countCopy;
    public final WritableIntChunk starts;
    public final ResettableWritableChunk valueResettable;
    public final ResettableWritableIntChunk countResettable;
    public final WritableBooleanChunk ssmsToMaybeClear;

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy