Module google_cloud_bigquery::storage::compute
source · Expand description
Computation kernels on Arrow Arrays
Modules§
- Computation kernels on Arrow Arrays
Structs§
- CastOptions provides a way to override the default cast behaviors
- A builder to construct
FilterPredicate - A filtering predicate that can be applied to an
Array - A lexicographical comparator that wraps given array data (columns) and can lexicographically compare data at given two indices. The lifetime is the same at the data wrapped.
- A computed set of partitions, see
partition - An iterator of
(usize, usize)each representing an interval[start, end)whose slots of a bitmap Buffer are true. Each interval corresponds to a contiguous region of memory to be “taken” from an array to be filtered. - One column to be used in lexicographical sort
- Options that define the sort order of a given column
- Options that define how
takeshould behave
Functions§
- Performs
ANDoperation on two arrays. If either left or right value is null then the result is also null. - Logical ‘and’ boolean values with Kleene logic
- Given two arrays of length
len, callsop(a[i], b[i])foriin0..len, collecting the results in aPrimitiveArray. If any index is null in eitheraorb, the corresponding index in the result will also be null - Given two arrays of length
len, callsop(a[i], b[i])foriin0..len, mutating the mutablePrimitiveArraya. If any index is null in eitheraorb, the corresponding index in the result will also be null. - Returns the bitwise and of all non-null input values.
- Returns the bitwise or of all non-null input values.
- Returns the bitwise xor of all non-null input values.
- Returns true if all non-null input values are true, otherwise false.
- Returns true if any non-null input value is true, otherwise false.
- build_filterDeprecatedReturns a prepared function optimized to filter multiple arrays. Creating this function requires time, but using it is faster than filter when the same filter needs to be applied to multiple arrays (e.g. a multi-column
RecordBatch). WARNING: the nulls offilterare ignored and the value on its slot is considered. Therefore, it is considered undefined behavior to passfilterwith null values. - Return true if a value of type
from_typecan be cast into a value ofto_type. - Cast
arrayto the provided data type and return a new Array with typeto_type, if possible. - Cast
arrayto the provided data type and return a new Array with typeto_type, if possible. - Concatenates
batchestogether into a singleRecordBatch. - Perform SQL
CONTAINS(left, right) - Extracts the day of a given temporal primitive array as an array of integers
- Extracts the day of a given temporal array as an array of integers. If the given array isn’t temporal primitive or dictionary array, an
Errwill be returned. - Extracts the day of year of a given temporal primitive array as an array of integers The day of year that ranges from 1 to 366
- Extracts the day of year of a given temporal array as an array of integers The day of year that ranges from 1 to 366. If the given array isn’t temporal primitive or dictionary array, an
Errwill be returned. - Perform SQL
ENDSWITH(left, right) - eqDeprecatedPerform
left == rightoperation on twoPrimitiveArrays. - eq_binaryDeprecated
- eq_binary_scalarDeprecated
- eq_boolDeprecatedPerform
left == rightoperation onBooleanArray - eq_bool_scalarDeprecatedPerform
left == rightoperation onBooleanArrayand a scalar - eq_dynDeprecatedPerform
left == rightoperation on two (dynamic)Arrays. - eq_dyn_binary_scalarDeprecatedPerform
left == rightoperation on an array and a numeric scalar value. Supports BinaryArray and LargeBinaryArray - eq_dyn_bool_scalarDeprecatedPerform
left == rightoperation on an array and a numeric scalar value. - eq_dyn_scalarDeprecatedPerform
left == rightoperation on an array and a numeric scalar value. Supports PrimitiveArrays, and DictionaryArrays that have primitive values. - eq_dyn_utf8_scalarDeprecatedPerform
left == rightoperation on an array and a numeric scalar value. Supports StringArrays, and DictionaryArrays that have string values - eq_scalarDeprecatedPerform
left == rightoperation on aPrimitiveArrayand a scalar value. - eq_utf8Deprecated
- eq_utf8_scalarDeprecated
- Filters an Array, returning elements matching the filter (i.e. where the values are true).
- Returns a new RecordBatch with arrays containing only values matching the filter.
- gtDeprecatedPerform
left > rightoperation on twoPrimitiveArrays. Non-null values are greater than null values. - gt_binaryDeprecated
- gt_binary_scalarDeprecated
- gt_boolDeprecatedPerform
left > rightoperation onBooleanArray - gt_bool_scalarDeprecatedPerform
left > rightoperation onBooleanArrayand a scalar - gt_dynDeprecatedPerform
left > rightoperation on two (dynamic)Arrays. - gt_dyn_binary_scalarDeprecatedPerform
left > rightoperation on an array and a numeric scalar value. Supports BinaryArray and LargeBinaryArray - gt_dyn_bool_scalarDeprecatedPerform
left > rightoperation on an array and a numeric scalar value. Supports BooleanArrays. - gt_dyn_scalarDeprecatedPerform
left > rightoperation on an array and a numeric scalar value. Supports PrimitiveArrays, and DictionaryArrays that have primitive values. - gt_dyn_utf8_scalarDeprecatedPerform
left > rightoperation on an array and a numeric scalar value. Supports StringArrays, and DictionaryArrays that have string values - gt_eqDeprecatedPerform
left >= rightoperation on twoPrimitiveArrays. Non-null values are greater than null values. - gt_eq_binaryDeprecated
- gt_eq_binary_scalarDeprecated
- gt_eq_boolDeprecatedPerform
left >= rightoperation onBooleanArray - gt_eq_bool_scalarDeprecatedPerform
left >= rightoperation onBooleanArrayand a scalar - gt_eq_dynDeprecatedPerform
left >= rightoperation on two (dynamic)Arrays. - gt_eq_dyn_binary_scalarDeprecatedPerform
left >= rightoperation on an array and a numeric scalar value. Supports BinaryArray and LargeBinaryArray - gt_eq_dyn_bool_scalarDeprecatedPerform
left >= rightoperation on an array and a numeric scalar value. Supports BooleanArrays. - gt_eq_dyn_scalarDeprecatedPerform
left >= rightoperation on an array and a numeric scalar value. Supports PrimitiveArrays, and DictionaryArrays that have primitive values. - gt_eq_dyn_utf8_scalarDeprecatedPerform
left >= rightoperation on an array and a numeric scalar value. Supports StringArrays, and DictionaryArrays that have string values - gt_eq_scalarDeprecatedPerform
left >= rightoperation on aPrimitiveArrayand a scalar value. Non-null values are greater than null values. - gt_eq_utf8Deprecated
- gt_eq_utf8_scalarDeprecated
- gt_scalarDeprecatedPerform
left > rightoperation on aPrimitiveArrayand a scalar value. Non-null values are greater than null values. - gt_utf8Deprecated
- gt_utf8_scalarDeprecated
- Extracts the hours of a given temporal primitive array as an array of integers within the range of [0, 23].
- Extracts the hours of a given array as an array of integers within the range of [0, 23]. If the given array isn’t temporal primitive or dictionary array, an
Errwill be returned. - Perform SQL
left ILIKE right - Checks if a
GenericListArraycontains a value in thePrimitiveArray - Checks if a
GenericListArraycontains a value in theGenericStringArray - Returns a non-null BooleanArray with whether each value of the array is not null.
- Returns a non-null BooleanArray with whether each value of the array is null.
- lexicographical_partition_rangesDeprecatedUse
partitioninstead. Given a list of already sorted columns, find partition ranges that would partition lexicographically equal values across columns. - Sort a list of
ArrayRefusingSortOptionsprovided for each array. - Sort elements lexicographically from a list of
ArrayRefinto an unsigned integer (UInt32Array) of indices. - Perform SQL
left LIKE right - ltDeprecatedPerform
left < rightoperation on twoPrimitiveArrays. Null values are less than non-null values. - lt_binaryDeprecated
- lt_binary_scalarDeprecated
- lt_boolDeprecatedPerform
left < rightoperation onBooleanArray - lt_bool_scalarDeprecatedPerform
left < rightoperation onBooleanArrayand a scalar - lt_dynDeprecatedPerform
left < rightoperation on two (dynamic)Arrays. - lt_dyn_binary_scalarDeprecatedPerform
left < rightoperation on an array and a numeric scalar value. Supports BinaryArray and LargeBinaryArray - lt_dyn_bool_scalarDeprecatedPerform
left < rightoperation on an array and a numeric scalar value. Supports BooleanArrays. - lt_dyn_scalarDeprecatedPerform
left < rightoperation on an array and a numeric scalar value. Supports PrimitiveArrays, and DictionaryArrays that have primitive values. - lt_dyn_utf8_scalarDeprecatedPerform
left < rightoperation on an array and a numeric scalar value. Supports StringArrays, and DictionaryArrays that have string values - lt_eqDeprecatedPerform
left <= rightoperation on twoPrimitiveArrays. Null values are less than non-null values. - lt_eq_binaryDeprecated
- lt_eq_binary_scalarDeprecated
- lt_eq_boolDeprecatedPerform
left <= rightoperation onBooleanArray - lt_eq_bool_scalarDeprecatedPerform
left <= rightoperation onBooleanArrayand a scalar - lt_eq_dynDeprecatedPerform
left <= rightoperation on two (dynamic)Arrays. - lt_eq_dyn_binary_scalarDeprecatedPerform
left <= rightoperation on an array and a numeric scalar value. Supports BinaryArray and LargeBinaryArray - lt_eq_dyn_bool_scalarDeprecatedPerform
left <= rightoperation on an array and a numeric scalar value. Supports BooleanArrays. - lt_eq_dyn_scalarDeprecatedPerform
left <= rightoperation on an array and a numeric scalar value. Supports PrimitiveArrays, and DictionaryArrays that have primitive values. - lt_eq_dyn_utf8_scalarDeprecatedPerform
left <= rightoperation on an array and a numeric scalar value. Supports StringArrays, and DictionaryArrays that have string values - lt_eq_scalarDeprecatedPerform
left <= rightoperation on aPrimitiveArrayand a scalar value. Null values are less than non-null values. - lt_eq_utf8Deprecated
- lt_eq_utf8_scalarDeprecated
- lt_scalarDeprecatedPerform
left < rightoperation on aPrimitiveArrayand a scalar value. Null values are less than non-null values. - lt_utf8Deprecated
- lt_utf8_scalarDeprecated
- Returns the maximum value in the array, according to the natural order. For floating point arrays any NaN values are considered to be greater than any other non-null value
- Returns the max of values in the array of
ArrowNumericTypetype, or dictionary array with value ofArrowNumericTypetype. - Returns the maximum value in the binary array, according to the natural order.
- Returns the maximum value in the boolean array
- Returns the maximum value in the string array, according to the natural order.
- Extracts the microseconds of a given temporal primitive array as an array of integers
- Extracts the microseconds of a given temporal primitive array as an array of integers. If the given array isn’t temporal primitive or dictionary array, an
Errwill be returned. - Extracts the milliseconds of a given temporal primitive array as an array of integers
- Extracts the milliseconds of a given temporal primitive array as an array of integers. If the given array isn’t temporal primitive or dictionary array, an
Errwill be returned. - Returns the minimum value in the array, according to the natural order. For floating point arrays any NaN values are considered to be greater than any other non-null value
- Returns the min of values in the array of
ArrowNumericTypetype, or dictionary array with value ofArrowNumericTypetype. - Returns the minimum value in the binary array, according to the natural order.
- Returns the minimum value in the boolean array.
- Returns the minimum value in the string array, according to the natural order.
- Extracts the minutes of a given temporal primitive array as an array of integers
- Extracts the minutes of a given temporal array as an array of integers. If the given array isn’t temporal primitive or dictionary array, an
Errwill be returned. - Extracts the month of a given temporal primitive array as an array of integers within the range of [1, 12].
- Extracts the month of a given temporal array as an array of integers. If the given array isn’t temporal primitive or dictionary array, an
Errwill be returned. - Perform
left * rightoperation on two decimal arrays. If either left or right value is null then the result is also null. - Perform
left * rightoperation on two decimal arrays. If either left or right value is null then the result is also null. - Perform
left * rightoperation on two decimal arrays. If either left or right value is null then the result is also null. - Extracts the nanoseconds of a given temporal primitive array as an array of integers
- Extracts the nanoseconds of a given temporal primitive array as an array of integers. If the given array isn’t temporal primitive or dictionary array, an
Errwill be returned. - neqDeprecatedPerform
left != rightoperation on twoPrimitiveArrays. - neq_binaryDeprecated
- neq_binary_scalarDeprecated
- neq_boolDeprecatedPerform
left != rightoperation onBooleanArray - neq_bool_scalarDeprecatedPerform
left != rightoperation onBooleanArrayand a scalar - neq_dynDeprecatedPerform
left != rightoperation on two (dynamic)Arrays. - neq_dyn_binary_scalarDeprecatedPerform
left != rightoperation on an array and a numeric scalar value. Supports BinaryArray and LargeBinaryArray - neq_dyn_bool_scalarDeprecatedPerform
left != rightoperation on an array and a numeric scalar value. Supports BooleanArrays. - neq_dyn_scalarDeprecatedPerform
left != rightoperation on an array and a numeric scalar value. Supports PrimitiveArrays, and DictionaryArrays that have primitive values. - neq_dyn_utf8_scalarDeprecatedPerform
left != rightoperation on an array and a numeric scalar value. Supports StringArrays, and DictionaryArrays that have string values - neq_scalarDeprecatedPerform
left != rightoperation on aPrimitiveArrayand a scalar value. - neq_utf8Deprecated
- neq_utf8_scalarDeprecated
- Perform SQL
left NOT ILIKE right - Perform SQL
left NOT LIKE right - Performs unary
NOToperation on an arrays. If value is null then the result is also null. - Copies original array, setting validity bit to false if a secondary comparison boolean array is set to true
- Extracts the day of week of a given temporal primitive array as an array of integers.
- Extracts the day of week of a given temporal array as an array of integers.
- Extracts the day of week of a given temporal primitive array as an array of integers, starting at Sunday.
- Extracts the day of week of a given temporal array as an array of integers, starting at Sunday.
- Performs
ORoperation on two arrays. If either left or right value is null then the result is also null. - Logical ‘or’ boolean values with Kleene logic
- It’s unstable_sort, may not preserve the order of equal elements
- Given a list of lexicographically sorted columns, computes the
Partitions, where a partition consists of the set of consecutive rows with equal values - Remove null values by do a bitmask AND operation with null bits and the boolean bits.
- Extracts the quarter of a given temporal primitive array as an array of integers within the range of [1, 4].
- Extracts the quarter of a given temporal array as an array of integersa within the range of [1, 4]. If the given array isn’t temporal primitive or dictionary array, an
Errwill be returned. - Assigns a rank to each value in
arraybased on its position in the sorted order - Perform SQL
array ~ regex_arrayoperation onStringArray/LargeStringArray. Ifregex_arrayelement has an empty value, the corresponding result value is always true. - Extract all groups matched by a regular expression for a given String array.
- Extracts the seconds of a given temporal primitive array as an array of integers
- Extracts the seconds of a given temporal array as an array of integers. If the given array isn’t temporal primitive or dictionary array, an
Errwill be returned. - Shifts array by defined number of items (to left or right) A positive value for
offsetshifts the array to the right a negative value shifts the array to the left. - Sort the
ArrayRefusingSortOptions. - Sort the
ArrayRefpartially. - Sort elements from
ArrayRefinto an unsigned integer (UInt32Array) of indices. Floats are sorted using IEEE 754 totalOrder.limitis an option for partial_sort. - Perform SQL
STARTSWITH(left, right) - Returns the sum of values in the primitive array.
- Returns the sum of values in the array.
- Returns the sum of values in the array.
- Returns the sum of values in the primitive array.
- Applies the provided fallible binary operation across
aandb, returning any error, and collecting the results into aPrimitiveArray. If any index is null in eitheraorb, the corresponding index in the result will also be null - Applies the provided fallible binary operation across
aandbby mutating the mutablePrimitiveArrayawith the results, returning any error. If any index is null in eitheraorb, the corresponding index in the result will also be null - try_unary_dynDeprecatedApplies a fallible unary function to an array with primitive values.
- unary_cmpDeprecatedApplies an unary and infallible comparison function to a primitive array.
- unary_dynDeprecatedApplies an infallible unary function to an array with primitive values.
- using_chrono_tz_and_utc_naive_date_timeDeprecatedParse the given string into a string representing fixed-offset that is correct as of the given UTC NaiveDateTime. Note that the offset is function of time and can vary depending on whether daylight savings is in effect or not. e.g. Australia/Sydney is +10:00 or +11:00 depending on DST.
- Extracts the week of a given temporal primitive array as an array of integers
- Extracts the week of a given temporal array as an array of integers. If the given array isn’t temporal primitive or dictionary array, an
Errwill be returned. - Extracts the years of a given temporal primitive array as an array of integers
- Extracts the years of a given temporal array as an array of integers. If the given array isn’t temporal primitive or dictionary array, an
Errwill be returned.
Type Aliases§
- FilterDeprecatedFunction that can filter arbitrary arrays