From 815e10b9e5ee65fbf4d02f52c42cfef7a27f913d Mon Sep 17 00:00:00 2001 From: zhyass <34016424+zhyass@users.noreply.github.com> Date: Thu, 2 Sep 2021 19:22:01 +0800 Subject: [PATCH] Improved the docs --- src/compute/comparison/utf8.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/compute/comparison/utf8.rs b/src/compute/comparison/utf8.rs index 17f365ec23f..7fd449e520a 100644 --- a/src/compute/comparison/utf8.rs +++ b/src/compute/comparison/utf8.rs @@ -22,7 +22,7 @@ use crate::{array::*, bitmap::Bitmap}; use super::{super::utils::combine_validities, Operator}; -/// Evaluate `op(lhs, rhs)` for [`PrimitiveArray`]s using a specified +/// Evaluate `op(lhs, rhs)` for [`Utf8Array`]s using a specified /// comparison function. fn compare_op(lhs: &Utf8Array, rhs: &Utf8Array, op: F) -> Result where @@ -46,7 +46,7 @@ where Ok(BooleanArray::from_data(DataType::Boolean, values, validity)) } -/// Evaluate `op(lhs, rhs)` for [`PrimitiveArray`] and scalar using +/// Evaluate `op(lhs, rhs)` for [`Utf8Array`] and scalar using /// a specified comparison function. fn compare_op_scalar(lhs: &Utf8Array, rhs: &str, op: F) -> BooleanArray where @@ -61,62 +61,62 @@ where BooleanArray::from_data(DataType::Boolean, values, validity) } -/// Perform `lhs == rhs` operation on [`StringArray`] / [`LargeStringArray`]. +/// Perform `lhs == rhs` operation on [`Utf8Array`]. fn eq(lhs: &Utf8Array, rhs: &Utf8Array) -> Result { compare_op(lhs, rhs, |a, b| a == b) } -/// Perform `lhs == rhs` operation on [`StringArray`] / [`LargeStringArray`] and a scalar. +/// Perform `lhs == rhs` operation on [`Utf8Array`] and a scalar. fn eq_scalar(lhs: &Utf8Array, rhs: &str) -> BooleanArray { compare_op_scalar(lhs, rhs, |a, b| a == b) } -/// Perform `lhs != rhs` operation on [`StringArray`] / [`LargeStringArray`]. +/// Perform `lhs != rhs` operation on [`Utf8Array`]. fn neq(lhs: &Utf8Array, rhs: &Utf8Array) -> Result { compare_op(lhs, rhs, |a, b| a != b) } -/// Perform `lhs != rhs` operation on [`StringArray`] / [`LargeStringArray`] and a scalar. +/// Perform `lhs != rhs` operation on [`Utf8Array`] and a scalar. fn neq_scalar(lhs: &Utf8Array, rhs: &str) -> BooleanArray { compare_op_scalar(lhs, rhs, |a, b| a != b) } -/// Perform `lhs < rhs` operation on [`StringArray`] / [`LargeStringArray`]. +/// Perform `lhs < rhs` operation on [`Utf8Array`]. fn lt(lhs: &Utf8Array, rhs: &Utf8Array) -> Result { compare_op(lhs, rhs, |a, b| a < b) } -/// Perform `lhs < rhs` operation on [`StringArray`] / [`LargeStringArray`] and a scalar. +/// Perform `lhs < rhs` operation on [`Utf8Array`] and a scalar. fn lt_scalar(lhs: &Utf8Array, rhs: &str) -> BooleanArray { compare_op_scalar(lhs, rhs, |a, b| a < b) } -/// Perform `lhs <= rhs` operation on [`StringArray`] / [`LargeStringArray`]. +/// Perform `lhs <= rhs` operation on [`Utf8Array`]. fn lt_eq(lhs: &Utf8Array, rhs: &Utf8Array) -> Result { compare_op(lhs, rhs, |a, b| a <= b) } -/// Perform `lhs <= rhs` operation on [`StringArray`] / [`LargeStringArray`] and a scalar. +/// Perform `lhs <= rhs` operation on [`Utf8Array`] and a scalar. fn lt_eq_scalar(lhs: &Utf8Array, rhs: &str) -> BooleanArray { compare_op_scalar(lhs, rhs, |a, b| a <= b) } -/// Perform `lhs > rhs` operation on [`StringArray`] / [`LargeStringArray`]. +/// Perform `lhs > rhs` operation on [`Utf8Array`]. fn gt(lhs: &Utf8Array, rhs: &Utf8Array) -> Result { compare_op(lhs, rhs, |a, b| a > b) } -/// Perform `lhs > rhs` operation on [`StringArray`] / [`LargeStringArray`] and a scalar. +/// Perform `lhs > rhs` operation on [`Utf8Array`] and a scalar. fn gt_scalar(lhs: &Utf8Array, rhs: &str) -> BooleanArray { compare_op_scalar(lhs, rhs, |a, b| a > b) } -/// Perform `lhs >= rhs` operation on [`StringArray`] / [`LargeStringArray`]. +/// Perform `lhs >= rhs` operation on [`Utf8Array`]. fn gt_eq(lhs: &Utf8Array, rhs: &Utf8Array) -> Result { compare_op(lhs, rhs, |a, b| a >= b) } -/// Perform `lhs >= rhs` operation on [`StringArray`] / [`LargeStringArray`] and a scalar. +/// Perform `lhs >= rhs` operation on [`Utf8Array`] and a scalar. fn gt_eq_scalar(lhs: &Utf8Array, rhs: &str) -> BooleanArray { compare_op_scalar(lhs, rhs, |a, b| a >= b) }