Module datafusion_common::utils
source · Expand description
This module provides the bisect function, which implements binary search.
Modules
- Adopted from strsim-rs for string similarity metrics
Traits
- An extension trait for smart pointers. Provides an interface to get a raw pointer to the data (with metadata stripped away).
Functions
- This function searches for a tuple of given values (
target
) among the given rows (item_columns
) using the bisection algorithm. It assumes thatitem_columns
is sorted according tosort_options
and returns the insertion index oftarget
. Template argumentSIDE
beingtrue
/false
means left/right insertion. - This function compares two tuples depending on the given sort options.
- Given a list of 0 or more already sorted columns, finds the partition ranges that would partition equally across columns.
- This function searches for a tuple of given values (
target
) among a slice of the given rows (item_columns
) using the bisection algorithm. The slice starts at the indexlow
and ends at the indexhigh
. The boolean-valued functioncompare_fn
specifies whether we bisect on the left (by returningfalse
), or on the right (by returningtrue
) when we compare the target value with the current value as we iteratively bisect the input. - This function “takes” the elements at
indices
from the sliceitems
. - Construct a new RecordBatch from the rows of the
record_batch
at theindices
. - Given column vectors, returns row at
idx
. - This function searches for a tuple of given values (
target
) among the given rows (item_columns
) via a linear scan. It assumes thatitem_columns
is sorted according tosort_options
and returns the insertion index oftarget
. Template argumentSIDE
beingtrue
/false
means left/right insertion. - This function finds the longest prefix of the form 0, 1, 2, … within the collection
sequence
. Examples: - Applies an optional projection to a [
SchemaRef
], returning the projected schema - Wraps identifier string in double quotes, escaping any double quotes in the identifier by replacing it with two double quotes
- This function searches for a tuple of given values (
target
) among a slice of the given rows (item_columns
) via a linear scan. The slice starts at the indexlow
and ends at the indexhigh
. The boolean-valued functioncompare_fn
specifies the stopping criterion.