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

io.deephaven.engine.table.impl.sources.regioned.DeferredColumnRegionObject 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.sources.regioned;

import io.deephaven.chunk.attributes.Any;
import io.deephaven.engine.rowset.RowSequence;
import io.deephaven.engine.rowset.RowSet;
import io.deephaven.engine.rowset.RowSetBuilderSequential;
import io.deephaven.engine.table.impl.chunkattributes.DictionaryKeys;
import org.jetbrains.annotations.NotNull;

import java.util.function.Supplier;

/**
 * {@link ColumnRegionShort} implementation for deferred regions, i.e. regions that will be properly constructed on
 * first access.
 */
public class DeferredColumnRegionObject
        extends DeferredColumnRegionBase>
        implements ColumnRegionObject {

    DeferredColumnRegionObject(final long pageMask, @NotNull final Supplier> resultRegionFactory) {
        super(pageMask, resultRegionFactory);
    }

    @Override
    public DATA_TYPE getObject(final long elementIndex) {
        return getResultRegion().getObject(elementIndex);
    }

    @Override
    public DATA_TYPE getObject(@NotNull final FillContext context, final long elementIndex) {
        return getResultRegion().getObject(context, elementIndex);
    }

    @Override
    public RegionVisitResult supportsDictionaryFormat(@NotNull final RowSet.SearchIterator keysToVisit) {
        return getResultRegion().supportsDictionaryFormat(keysToVisit);
    }

    @Override
    public boolean gatherDictionaryValuesRowSet(@NotNull final RowSet.SearchIterator keysToVisit,
                                                @NotNull final RowSequence.Iterator knownKeys,
                                                @NotNull final RowSetBuilderSequential sequentialBuilder) {
        return getResultRegion().gatherDictionaryValuesRowSet(keysToVisit, knownKeys, sequentialBuilder);
    }

    @Override
    public ColumnRegionLong getDictionaryKeysRegion() {
        return getResultRegion().getDictionaryKeysRegion();
    }

    @Override
    public ColumnRegionObject getDictionaryValuesRegion() {
        return getResultRegion().getDictionaryValuesRegion();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy