Interface InMemoryColumnSource

All Known Implementing Classes:
ArrayBackedColumnSource, BooleanArraySource, BooleanSingleValueSource, BooleanSparseArraySource, ByteArraySource, ByteSingleValueSource, ByteSparseArraySource, CharacterArraySource, CharacterSingleValueSource, CharacterSparseArraySource, DoubleArraySource, DoubleSingleValueSource, DoubleSparseArraySource, FloatArraySource, FloatSingleValueSource, FloatSparseArraySource, Immutable2DByteArraySource, Immutable2DCharArraySource, Immutable2DDoubleArraySource, Immutable2DFloatArraySource, Immutable2DInstantArraySource, Immutable2DIntArraySource, Immutable2DLongArraySource, Immutable2DNanosBasedTimeArraySource, Immutable2DObjectArraySource, Immutable2DShortArraySource, Immutable2DZonedDateTimeArraySource, ImmutableByteArraySource, ImmutableCharArraySource, ImmutableConstantByteSource, ImmutableConstantCharSource, ImmutableConstantDoubleSource, ImmutableConstantFloatSource, ImmutableConstantInstantSource, ImmutableConstantIntSource, ImmutableConstantLongSource, ImmutableConstantNanosBasedTimeSource, ImmutableConstantObjectSource, ImmutableConstantShortSource, ImmutableConstantZonedDateTimeSource, ImmutableDoubleArraySource, ImmutableFloatArraySource, ImmutableInstantArraySource, ImmutableIntArraySource, ImmutableLongArraySource, ImmutableNanosBasedTimeArraySource, ImmutableObjectArraySource, ImmutableShortArraySource, ImmutableZonedDateTimeArraySource, InstantArraySource, InstantSparseArraySource, IntegerArraySource, IntegerSingleValueSource, IntegerSparseArraySource, LongArraySource, LongSingleValueSource, LongSparseArraySource, NanosBasedTimeArraySource, NanosBasedTimeSparseArraySource, NullValueColumnSource, ObjectArraySource, ObjectSingleValueSource, ObjectSparseArraySource, ShiftedColumnSource, ShortArraySource, ShortSingleValueSource, ShortSparseArraySource, SingleValueColumnSource, SparseArrayColumnSource, ZonedDateTimeArraySource, ZonedDateTimeSparseArraySource

public interface InMemoryColumnSource
This is a marker interface for a column source that might be entirely within memory; therefore select operations should not try to copy it into memory a second time.
  • Field Details

    • TWO_DIMENSIONAL_COLUMN_SOURCE_THRESHOLD

      static final int TWO_DIMENSIONAL_COLUMN_SOURCE_THRESHOLD
      See Also:
  • Method Details

    • isInMemory

      default boolean isInMemory()
      Returns:
      true if this column source is entirely in memory.
    • getImmutableMemoryColumnSource

      static <T> WritableColumnSource<T> getImmutableMemoryColumnSource(long longSize, @NotNull @NotNull Class<T> dataType, @Nullable @Nullable Class<?> componentType)
      Create an immutable in-memory column source that is capable of holding longSize elements.

      Note, that the backing array may not be allocated after this call; you still must call WritableColumnSource.ensureCapacity(long).

      Parameters:
      longSize - the minimum required size that the column source must support
      dataType - the data type of the resultant column source
      componentType - the component type for column sources of arrays or Vectors
      Returns:
      an immutable WritableColumnSource
    • makeImmutableSource

      @NotNull static <T> @NotNull WritableColumnSource<T> makeImmutableSource(@NotNull @NotNull Class<T> dataType, @Nullable @Nullable Class<?> componentType)
    • makeImmutable2DSource

      @NotNull static <T> @NotNull WritableColumnSource<T> makeImmutable2DSource(@NotNull @NotNull Class<T> dataType, @Nullable @Nullable Class<?> componentType)
    • makeImmutableConstantSource

      @NotNull static <T> @NotNull ColumnSource<T> makeImmutableConstantSource(@NotNull @NotNull Class<T> dataType, @Nullable @Nullable Class<?> componentType, @Nullable T value)
    • getImmutableMemoryColumnSource

      static ColumnSource<?> getImmutableMemoryColumnSource(@NotNull @NotNull Object dataArray)
      Wrap the input array in an immutable ColumnSource. This method will unbox any boxed values, and directly use the result array.
      Parameters:
      dataArray - The array to turn into a ColumnSource
      Returns:
      An Immutable ColumnSource that directly wraps the input array.
    • getImmutableMemoryColumnSource

      static <T> ColumnSource<T> getImmutableMemoryColumnSource(@NotNull @NotNull Object dataArray, @NotNull @NotNull Class<T> dataType, @Nullable @Nullable Class<?> componentType)
      Wrap the input array in an immutable ColumnSource. This method will unbox any boxed values, and directly use the result array. This version allows the user to specify the column data type. It will automatically map column type Boolean/boolean with input array types byte[] and columnType Instant / array type long[].
      Parameters:
      dataArray - The array to turn into a ColumnSource
      dataType - the data type of the resultant column source
      componentType - the component type for column sources of arrays or Vectors
      Returns:
      An Immutable ColumnSource that directly wraps the input array.