Module datafusion::common::utils

source ·
Expand description

This module provides the bisect function, which implements binary search.

Modules§

Functions§

  • Wrap an array into a single element LargeListArray. For example [1, 2, 3] would be converted into [[1, 2, 3]]
  • Array Utils Wrap an array into a single element ListArray. For example [1, 2, 3] would be converted into [[1, 2, 3]]
  • Wrap arrays into a single element ListArray.
  • Get the base type of a data type.
  • This function searches for a tuple of given values (target) among the given rows (item_columns) using the bisection algorithm. It assumes that item_columns is sorted according to sort_options and returns the insertion index of target. Template argument SIDE being true/false means left/right insertion.
  • Recursively coerce and FixedSizeList elements to List
  • A helper function to coerce base type in List.
  • 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 index low and ends at the index high. The boolean-valued function compare_fn specifies whether we bisect on the left (by returning false), or on the right (by returning true) when we compare the target value with the current value as we iteratively bisect the input.
  • Find indices of each element in targets inside items. If one of the elements is absent in items, returns an error.
  • Construct a new Vec of ArrayRef from the rows of the arrays at the indices.
  • This function “takes” the elements at indices from the slice items.
  • Construct a new RecordBatch from the rows of the record_batch at the indices.
  • Given column vectors, returns row at idx.
  • Checks whether the given index sequence is monotonically non-decreasing.
  • This function searches for a tuple of given values (target) among the given rows (item_columns) via a linear scan. It assumes that item_columns is sorted according to sort_options and returns the insertion index of target. Template argument SIDE being true/false means left/right insertion.
  • Compute the number of dimensions in a list data type.
  • This function finds the longest prefix of the form 0, 1, 2, … within the collection sequence. Examples:
  • Merges collections first and second, removes duplicates and sorts the result, returning it as a Vec.
  • 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 index low and ends at the index high. The boolean-valued function compare_fn specifies the stopping criterion.
  • Calculates the set difference between sequences first and second, returning the result as a Vec. Preserves the ordering of first.