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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> WritableColumnSource<T>
getImmutableMemoryColumnSource
(long longSize, @NotNull Class<T> dataType, @Nullable Class<?> componentType) Create an immutable in-memory column source that is capable of holding longSize elements.static ColumnSource<?>
getImmutableMemoryColumnSource
(@NotNull Object dataArray) Wrap the input array in an immutableColumnSource
.static <T> ColumnSource<T>
getImmutableMemoryColumnSource
(@NotNull Object dataArray, @NotNull Class<T> dataType, @Nullable Class<?> componentType) Wrap the input array in an immutableColumnSource
.default boolean
static <T> @NotNull WritableColumnSource<T>
makeImmutable2DSource
(@NotNull Class<T> dataType, @Nullable Class<?> componentType) static <T> @NotNull ColumnSource<T>
makeImmutableConstantSource
(@NotNull Class<T> dataType, @Nullable Class<?> componentType, T value) static <T> @NotNull WritableColumnSource<T>
makeImmutableSource
(@NotNull Class<T> dataType, @Nullable Class<?> componentType)
-
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 supportdataType
- the data type of the resultant column sourcecomponentType
- 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
Wrap the input array in an immutableColumnSource
. 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 immutableColumnSource
. 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 ColumnSourcedataType
- the data type of the resultant column sourcecomponentType
- the component type for column sources of arrays or Vectors- Returns:
- An Immutable ColumnSource that directly wraps the input array.
-