chore: fix ArrayAgg docs
@@ -32,7 +32,7 @@ use crate::prelude::*;
/// Same common aggregators
pub trait ArrayAgg: Debug {
/// Aggregate the sum of the ChunkedArray.
- /// Returns `DataValue::Null` if the array is empty or only contains null values.
+ /// Returns `Null` value of current data type if the array is empty or only contains null values.
fn sum(&self) -> Result<DataValue> {
Err(ErrorCode::BadDataValueType(format!(
"Sum operation not supported for {:?}",
@@ -40,14 +40,17 @@ pub trait ArrayAgg: Debug {
)))
}
+ /// Returns the minimum value in the array, according to the natural order.
+ /// Returns `Null` value of current data type if the array is empty or only contains null values.
fn min(&self) -> Result<DataValue> {
Err(ErrorCode::BadDataValueType(format!(
"Min operation not supported for {:?}",
self,
)))
}
+
/// Returns the maximum value in the array, according to the natural order.
- /// Returns `DataValue::Null` if the array is empty or only contains null values.
+ /// Returns `Null` value of current data type if the array is empty or only contains null values.
fn max(&self) -> Result<DataValue> {
Err(ErrorCode::BadDataValueType(format!(
"Max operation not supported for {:?}",
@@ -55,7 +58,7 @@ pub trait ArrayAgg: Debug {
)))
}
- // DataValue::Struct(index, value)
+ /// Return DataValue::Struct(index: UInt64, value)
fn arg_max(&self) -> Result<DataValue> {
Err(ErrorCode::BadDataValueType(format!(
"Argmax operation not supported for {:?}",
@@ -63,6 +66,7 @@ pub trait ArrayAgg: Debug {
)))
}
+ /// Return DataValue::Struct(index: UInt64, value)
fn arg_min(&self) -> Result<DataValue> {
Err(ErrorCode::BadDataValueType(format!(
"Argmin operation not supported for {:?}",
