Applies merge-join on the arrays returning indices from each to keep in the resulting

    Parameters
    ----------
    arrays_self : list of (numpy.ndarray or WeldObject)
        Columns from the self DataFrame on which to join.
    weld_types_self : list of WeldType
        Corresponding Weld types.
    arrays_other : list of (numpy.ndarray or WeldObject)
        Columns from the other DataFrame on which to join.
    weld_types_other : list of WeldType
        Corresponding Weld types.
    how : {'inner', 'left', 'right'}
        Which kind of join to do.
    is_on_sorted : bool
        If we know that the on columns are already sorted, can employ faster algorithm.
    is_on_unique : bool
        If we know that the values are unique, can employ faster algorithm.
    readable_text : str
        Explanatory string to add in the Weld placeholder.

    Returns
    -------
    tuple of WeldObject
        Two columns of indices from the input arrays, indices of the rows from self and other that should be
        available in the resulting joined DataFrame.

def weld_merge_join(arrays_self, weld_types_self, arrays_other, weld_types_other,
                    how, is_on_sorted, is_on_unique, readable_text):
    """Applies merge-join on the arrays returning indices from each to keep in the resulting

    Parameters
    ----------
    arrays_self : list of (numpy.ndarray or WeldObject)
        Columns from the self DataFrame on which to join.
    weld_types_self : list of WeldType
        Corresponding Weld types.
    arrays_other : list of (numpy.ndarray or WeldObject)
        Columns from the other DataFrame on which to join.
    weld_types_other : list of WeldType
        Corresponding Weld types.
    how : {'inner', 'left', 'right'}
        Which kind of join to do.
    is_on_sorted : bool
        If we know that the on columns are already sorted, can employ faster algorithm.
    is_on_unique : bool
        If we know that the values are unique, can employ faster algorithm.
    readable_text : str
        Explanatory string to add in the Weld placeholder.

    Returns
    -------
    tuple of WeldObject
        Two columns of indices from the input arrays, indices of the rows from self and other that should be
        available in the resulting joined DataFrame.

    """
    assert is_on_unique

    weld_obj_vec_of_struct_self = weld_arrays_to_vec_of_struct(arrays_self, weld_types_self)
    weld_obj_vec_of_struct_other = weld_arrays_to_vec_of_struct(arrays_other, weld_types_other)

    weld_obj_join = _weld_merge_join(weld_obj_vec_of_struct_self,
                                     weld_obj_vec_of_struct_other,
                                     len(arrays_self),
                                     how,
                                     is_on_unique)

    intermediate_result = LazyStructOfVecResult(weld_obj_join, [WeldLong(), WeldLong()])
    dependency_name = Cache.cache_intermediate_result(intermediate_result, readable_text)

    weld_objects = extract_placeholder_weld_objects(dependency_name, 2, readable_text)

    return weld_objects