Interface FrameComparisonWidget

  • All Known Implementing Classes:
    FrameComparisonWidgetImpl

    public interface FrameComparisonWidget
    Wraps a Frame and provides ways to compare rows of that frame to various other things. Not thread-safe.
    • Method Detail

      • readKey

        RowKey readKey​(int row)
        Returns the RowKey corresponding to a particular row. The returned key is a copy that does not reference memory of the underlying Frame.
      • hasNonNullKeyParts

        boolean hasNonNullKeyParts​(int row,
                                   int[] keyParts)
        Whether particular key parts in a particular row are non-null. When NullHandling.replaceWithDefault(), default values (like empty strings and numeric zeroes) are considered null for purposes of this method. This behavior is inherited from FieldReader.isNull(Memory, long) and enables join code to behave similarly in MSQ and native queries.
        Parameters:
        row - row number
        keyParts - parts to check
      • 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. Comparison considers null to be equal to null. Callers that need to determine if key parts are null (perhaps because they *don't* want to consider null to be equal to null) should use hasNonNullKeyParts(int, int[]) to check the relevant parts.
      • 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 by FrameSort to sort frames in-place. Comparison considers null to be equal to null. Callers that need to determine if key parts are null (perhaps because they *don't* want to consider null to be equal to null) should use hasNonNullKeyParts(int, int[]) to check the relevant parts.