Package org.apache.druid.frame.key
Interface FrameComparisonWidget
-
- All Known Implementing Classes:
FrameComparisonWidgetImpl
public interface FrameComparisonWidget
Wraps aFrame
and provides ways to compare rows of that frame to various other things. Not thread-safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
compare(int row, FrameComparisonWidget otherWidget, int otherRow)
Compare a specific row of this frame to a specific row of another frame.int
compare(int row, RowKey key)
Compare a specific row of this frame to the provided key.boolean
isCompletelyNonNullKey(int row)
Whether a particular row has no null fields in its comparison key.RowKey
readKey(int row)
Returns theRowKey
corresponding to a particular row.
-
-
-
Method Detail
-
readKey
RowKey readKey(int row)
-
isCompletelyNonNullKey
boolean isCompletelyNonNullKey(int row)
Whether a particular row has no null fields in its comparison key. WhenNullHandling.replaceWithDefault()
, default values (like empty strings and numeric zeroes) are considered null for purposes of this method. This behavior is inherited fromFieldReader.isNull(Memory, long)
and enables join code to behave similarly in MSQ and native queries.
-
compare
int compare(int row, RowKey key)
Compare a specific row of this frame to the provided key. The key must have been created with sortColumns that match the ones used to create this widget, or else results are undefined.
-
compare
int compare(int row, FrameComparisonWidget otherWidget, int otherRow)
Compare a specific row of this frame to a specific row of another frame. The other frame must have the same sort key, or else results are undefined. The other frame may be the same object as this frame; for example, this is used byFrameSort
to sort frames in-place.
-
-