Package com.illumon.iris.db.v2.sources
Class EmptyToNullStringRegionedColumnSource<STRING_LIKE_TYPE extends CharSequence>
java.lang.Object
com.illumon.iris.db.v2.sources.AbstractColumnSource<STRING_LIKE_TYPE>
com.illumon.iris.db.v2.sources.EmptyToNullStringRegionedColumnSource<STRING_LIKE_TYPE>
- All Implemented Interfaces:
ChunkSource<Attributes.Values>,ChunkSource.WithPrev<Attributes.Values>,DefaultChunkSource<Attributes.Values>,DefaultChunkSource.WithPrev<Attributes.Values>,FillContextMaker,GetContextMaker,ColumnSource<STRING_LIKE_TYPE>,ColumnSourceGetDefaults.ForObject<STRING_LIKE_TYPE>,ElementSource<STRING_LIKE_TYPE>,MutableColumnSource<STRING_LIKE_TYPE>,MutableColumnSourceGetDefaults.ForObject<STRING_LIKE_TYPE>,Releasable,TupleExporter<STRING_LIKE_TYPE>,TupleSource<STRING_LIKE_TYPE>,Serializable
public class EmptyToNullStringRegionedColumnSource<STRING_LIKE_TYPE extends CharSequence>
extends AbstractColumnSource<STRING_LIKE_TYPE>
implements MutableColumnSourceGetDefaults.ForObject<STRING_LIKE_TYPE>
Regioned ColumnSource that replaces empty CharSequences with null.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
AbstractColumnSource.DefaultedImmutable<DATA_TYPE>, AbstractColumnSource.DefaultedMutable<DATA_TYPE>, AbstractColumnSource.IsSerializableNested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
ChunkSource.FillContext, ChunkSource.GetContext, ChunkSource.WithPrev<ATTR extends Attributes.Any>Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
DefaultChunkSource.SupportsContiguousGet<ATTR extends Attributes.Any>, DefaultChunkSource.WithPrev<ATTR extends Attributes.Any> -
Field Summary
Fields inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
componentType, typeFields inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
DEFAULT_FILL_INSTANCE, ZERO_LENGTH_CHUNK_SOURCE_ARRAYFields inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource.WithPrev
ZERO_LENGTH_CHUNK_SOURCE_WITH_PREV_ARRAYFields inherited from interface com.illumon.iris.db.v2.sources.ColumnSource
ZERO_LENGTH_COLUMN_SOURCE_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionEmptyToNullStringRegionedColumnSource(ColumnSource<STRING_LIKE_TYPE> innerSource, Runnable callback) Wrap inner source with a column source that replaces empty values with null. -
Method Summary
Modifier and TypeMethodDescriptionget(long index) Get the value from the source.Get aGroupingBuilderto construct grouping tables for this column.getPrev(long index) Get the previous value at the index.booleanCheck if this column has grouping information.booleanhasGrouping(ReadOnlyIndex relevantIndex) Check if this column has grouping information within the specified index.booleanDetermine if this column source is immutable, meaning that the values at a given index key never change.voidRelease any resources held for caching purposes.static <STRING_LIKE_TYPE extends CharSequence>
STRING_LIKE_TYPEreplaceEmptyWithNull(boolean isCompressed, STRING_LIKE_TYPE inputValue) Methods inherited from class com.illumon.iris.db.v2.sources.AbstractColumnSource
allowsReinterpret, canUseGrouping, defaultFillChunk, doReinterpret, fillChunk, fillPrevChunk, getComponentType, getGroupingProvider, getNativeType, getType, isSerializable, match, matchWithGrouping, reinterpret, setGroupingProviderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource
fillChunk, getChunkTypeMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.ChunkSource.WithPrev
fillPrevChunkMethods inherited from interface com.illumon.iris.db.v2.sources.ColumnSource
allowsReinterpret, cast, createPreviousTuple, createTuple, createTupleFromValues, exportElement, exportElement, exportToExternalKey, getColumnSources, getComponentType, getGroupingProvider, getNativeType, getPrevSource, getType, match, reinterpret, setGroupingProvider, startTrackingPrevValuesMethods inherited from interface com.illumon.iris.db.v2.sources.ColumnSourceGetDefaults.ForObject
getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLong, getShortMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource
getChunk, getChunk, getChunkByFilling, makeFillContext, makeGetContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.DefaultChunkSource.WithPrev
getPrevChunk, getPrevChunk, getPrevChunkByFillingMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.FillContextMaker
makeFillContextMethods inherited from interface com.illumon.iris.db.v2.sources.chunk.GetContextMaker
makeGetContextMethods inherited from interface com.illumon.iris.db.v2.sources.MutableColumnSourceGetDefaults.ForObject
getPrevBoolean, getPrevByte, getPrevChar, getPrevDouble, getPrevFloat, getPrevInt, getPrevLong, getPrevShortMethods inherited from interface com.illumon.iris.db.v2.tuples.TupleExporter
exportElementReinterpretedMethods inherited from interface com.illumon.iris.db.v2.tuples.TupleSource
createTupleFromReinterpretedValues
-
Constructor Details
-
EmptyToNullStringRegionedColumnSource
public EmptyToNullStringRegionedColumnSource(@NotNull ColumnSource<STRING_LIKE_TYPE> innerSource, @Nullable Runnable callback) Wrap inner source with a column source that replaces empty values with null. Callback will be invoked on the first occasion for remapping (modulo race conditions which may permit it to be invoked more than once).- Parameters:
innerSource- The inner sourcecallback- The callback
-
-
Method Details
-
get
Description copied from interface:ElementSourceGet the value from the source. This may return boxed values for basic types.- Specified by:
getin interfaceElementSource<STRING_LIKE_TYPE extends CharSequence>- Parameters:
index- the location in index space to get the value from.- Returns:
- the value at the index, potentially null.
-
getPrev
Description copied from interface:ElementSourceGet the previous value at the index. Previous values are used during anLTMupdatecycle to process changes in data. Duringnormaloperation previous values will be identical tocurrentvalues.- Specified by:
getPrevin interfaceElementSource<STRING_LIKE_TYPE extends CharSequence>- Parameters:
index- the location in index space to get the value from.- Returns:
- the previous value at the index, or null.
-
isImmutable
public boolean isImmutable()Description copied from interface:ColumnSourceDetermine if this column source is immutable, meaning that the values at a given index key never change.- Specified by:
isImmutablein interfaceColumnSource<STRING_LIKE_TYPE extends CharSequence>- Specified by:
isImmutablein interfaceMutableColumnSource<STRING_LIKE_TYPE extends CharSequence>- Returns:
- true if the values at a given index of the column source never change, false otherwise
-
releaseCachedResources
public void releaseCachedResources()Description copied from interface:ColumnSourceRelease any resources held for caching purposes. Implementations need not guarantee that concurrent accesses are correct, as the purpose of this method is to ensure cleanup for column sources that will no longer be used.- Specified by:
releaseCachedResourcesin interfaceColumnSource<STRING_LIKE_TYPE extends CharSequence>- Specified by:
releaseCachedResourcesin interfaceReleasable
-
replaceEmptyWithNull
public static <STRING_LIKE_TYPE extends CharSequence> STRING_LIKE_TYPE replaceEmptyWithNull(boolean isCompressed, STRING_LIKE_TYPE inputValue) -
hasGrouping
public boolean hasGrouping()Description copied from interface:ColumnSourceCheck if this column has grouping information.- Specified by:
hasGroupingin interfaceColumnSource<STRING_LIKE_TYPE extends CharSequence>- Overrides:
hasGroupingin classAbstractColumnSource<STRING_LIKE_TYPE extends CharSequence>- Returns:
- true if this column has groupings
-
hasGrouping
Description copied from interface:ColumnSourceCheck if this column has grouping information within the specified index.- Specified by:
hasGroupingin interfaceColumnSource<STRING_LIKE_TYPE extends CharSequence>- Overrides:
hasGroupingin classAbstractColumnSource<STRING_LIKE_TYPE extends CharSequence>- Parameters:
relevantIndex- the index to check for grouping within- Returns:
- true if this column has groupings
-
getGroupingBuilder
Description copied from interface:ColumnSourceGet aGroupingBuilderto construct grouping tables for this column. UseColumnSource.hasGrouping()to determine if this column has a grouping.- Specified by:
getGroupingBuilderin interfaceColumnSource<STRING_LIKE_TYPE extends CharSequence>- Overrides:
getGroupingBuilderin classAbstractColumnSource<STRING_LIKE_TYPE extends CharSequence>- Returns:
- a
GroupingBuilderif this column supports grouping.
-