Package org.apache.druid.frame.segment
Class FrameFilteredOffset
- java.lang.Object
-
- org.apache.druid.segment.data.Offset
-
- org.apache.druid.segment.SimpleSettableOffset
-
- org.apache.druid.frame.segment.FrameFilteredOffset
-
- All Implemented Interfaces:
Cloneable
,HotLoopCallee
,ReadableOffset
public class FrameFilteredOffset extends SimpleSettableOffset
Copy ofFilteredOffset
that does not require bitmap indexes. In a future whereFilteredOffset
is opened up for usage outside of regular segments, this class could be removed and usages could be migrated toFilteredOffset
.
-
-
Constructor Summary
Constructors Constructor Description FrameFilteredOffset(SimpleSettableOffset baseOffset, ColumnSelectorFactory columnSelectorFactory, Filter postFilter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Offset
clone()
SeeFilteredOffset.clone()
for notes.ReadableOffset
getBaseReadableOffset()
Returns the same offset ("this") or a readable "view" of this offset, which always returns the same value fromReadableOffset.getOffset()
, as this offset.int
getOffset()
void
increment()
void
inspectRuntimeShape(RuntimeShapeInspector inspector)
Implementations of this method should callinspector.visit()
with all fields of this class, which meet two conditions: 1.void
reset()
Resets the Offset to the position it was created or cloned with.void
setCurrentOffset(int currentOffset)
boolean
withinBounds()
-
-
-
Constructor Detail
-
FrameFilteredOffset
public FrameFilteredOffset(SimpleSettableOffset baseOffset, ColumnSelectorFactory columnSelectorFactory, Filter postFilter)
-
-
Method Detail
-
withinBounds
public boolean withinBounds()
- Specified by:
withinBounds
in classOffset
-
setCurrentOffset
public void setCurrentOffset(int currentOffset)
- Specified by:
setCurrentOffset
in classSimpleSettableOffset
-
reset
public void reset()
Description copied from class:Offset
Resets the Offset to the position it was created or cloned with.
-
getBaseReadableOffset
public ReadableOffset getBaseReadableOffset()
Description copied from class:Offset
Returns the same offset ("this") or a readable "view" of this offset, which always returns the same value fromReadableOffset.getOffset()
, as this offset. This method is useful for "unwrapping" such offsets asFilteredOffset
and reduce reference indirection, when onlyReadableOffset
API is needed.- Specified by:
getBaseReadableOffset
in classOffset
-
clone
public Offset clone()
SeeFilteredOffset.clone()
for notes.
-
getOffset
public int getOffset()
-
inspectRuntimeShape
public void inspectRuntimeShape(RuntimeShapeInspector inspector)
Description copied from interface:HotLoopCallee
Implementations of this method should callinspector.visit()
with all fields of this class, which meet two conditions: 1. They are used in methods of this class, annotated withCalledFromHotLoop
2. They are either: a. Nullable objects b. Instances of HotLoopCallee c. Objects, which don't always have a specific class in runtime. For example, a field of typeSet
could beHashSet
orTreeSet
in runtime, depending on how this instance (the instance on which inspectRuntimeShape() is called) is configured. d. ByteBuffer or similar objects, where byte order matters e. boolean flags, affecting branch taking f. Arrays of objects, meeting any of conditions a-e.
-
-