Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,13 @@ use datafusion_expr_common::groups_accumulator::{EmitTo, GroupsAccumulator};
/// Logical group Current Min/Max value for that group stored
/// number as a ScalarValue which points to an
/// individually allocated String
///
///```
/// ```
///
/// # Optimizations
///
/// The adapter minimizes the number of calls to [`Accumulator::update_batch`]
/// by first collecting the input rows for each group into a contiguous array
/// using [`compute::take`]
///
pub struct GroupsAccumulatorAdapter {
factory: Box<dyn Fn() -> Result<Box<dyn Accumulator>> + Send>,

Expand Down Expand Up @@ -184,7 +182,6 @@ impl GroupsAccumulatorAdapter {
/// └─────────┘ └─────────┘ └ ─ ─ ─ ─ ┘ └─────────┘ └ ─ ─ ─ ─ ┘
///
/// logical group values opt_filter logical group values opt_filter
///
/// ```
fn invoke_per_accumulator<F>(
&mut self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,6 @@ mod test {

/// Calls `NullState::accumulate` and `accumulate_indices` to
/// ensure it generates the correct values.
///
fn accumulate_test(
group_indices: &[usize],
values: &UInt32Array,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ where
/// The state is:
/// - self.prim_fn for all non null, non filtered values
/// - null otherwise
///
fn convert_to_state(
&self,
values: &[ArrayRef],
Expand Down
1 change: 0 additions & 1 deletion datafusion/functions-aggregate-common/src/tdigest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,6 @@ impl TDigest {
/// │└ ─ ─ ─ ┘│
/// │ │
/// ...
///
/// ```
///
/// The [`TDigest::from_scalar_state()`] method reverses this processes,
Expand Down
4 changes: 2 additions & 2 deletions datafusion/functions-aggregate/src/count.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ pub fn count_all() -> Expr {
/// // create `count(*)` OVER ... window function expression
/// let expr = count_all_window();
/// assert_eq!(
/// expr.schema_name().to_string(),
/// "count(Int64(1)) ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING"
/// expr.schema_name().to_string(),
/// "count(Int64(1)) ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING"
/// );
/// // if you need to refer to this column, use the `schema_name` function
/// let expr = col(expr.schema_name().to_string());
Expand Down
1 change: 0 additions & 1 deletion datafusion/functions-aggregate/src/median.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ impl<T: ArrowNumericType> Accumulator for MedianAccumulator<T> {
/// of groups before final evaluation.
/// So values in each group will be stored in a `Vec<T>`, and the total group values
/// will be actually organized as a `Vec<Vec<T>>`.
///
#[derive(Debug)]
struct MedianGroupsAccumulator<T: ArrowNumericType + Send> {
data_type: DataType,
Expand Down
1 change: 0 additions & 1 deletion datafusion/functions-aggregate/src/percentile_cont.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,6 @@ impl<T: ArrowNumericType> Accumulator for PercentileContAccumulator<T> {
/// of groups before final evaluation.
/// So values in each group will be stored in a `Vec<T>`, and the total group values
/// will be actually organized as a `Vec<Vec<T>>`.
///
#[derive(Debug)]
struct PercentileContGroupsAccumulator<T: ArrowNumericType + Send> {
data_type: DataType,
Expand Down
6 changes: 2 additions & 4 deletions datafusion/functions-nested/src/expr_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ use crate::extract::{array_element, array_slice};
/// ```
/// # use datafusion_expr::{lit, col, Expr};
/// # use datafusion_functions_nested::expr_ext::IndexAccessor;
/// let expr = col("c1")
/// .index(lit(3));
/// let expr = col("c1").index(lit(3));
/// assert_eq!(expr.schema_name().to_string(), "c1[Int32(3)]");
/// ```
pub trait IndexAccessor {
Expand Down Expand Up @@ -66,8 +65,7 @@ impl IndexAccessor for Expr {
/// ```
/// # use datafusion_expr::{lit, col};
/// # use datafusion_functions_nested::expr_ext::SliceAccessor;
/// let expr = col("c1")
/// .range(lit(2), lit(4));
/// let expr = col("c1").range(lit(2), lit(4));
/// assert_eq!(expr.schema_name().to_string(), "c1[Int32(2):Int32(4)]");
/// ```
pub trait SliceAccessor {
Expand Down
1 change: 0 additions & 1 deletion datafusion/functions-nested/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
//! [DataFusion]: https://crates.io/crates/datafusion
//!
//! You can register the functions in this crate using the [`register_all`] function.
//!

#[macro_use]
pub mod macros;
Expand Down
1 change: 0 additions & 1 deletion datafusion/functions-window-common/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ impl<'a> ExpressionArgs<'a> {
/// to the user-defined window function.
/// * `input_fields` - The fields corresponding to the
/// arguments to the user-defined window function.
///
pub fn new(
input_exprs: &'a [Arc<dyn PhysicalExpr>],
input_fields: &'a [FieldRef],
Expand Down
1 change: 0 additions & 1 deletion datafusion/functions-window-common/src/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ impl<'a> WindowUDFFieldArgs<'a> {
/// arguments to the user-defined window function.
/// * `function_name` - The qualified schema name of the
/// user-defined window function expression.
///
pub fn new(input_fields: &'a [FieldRef], display_name: &'a str) -> Self {
WindowUDFFieldArgs {
input_fields,
Expand Down
1 change: 0 additions & 1 deletion datafusion/functions-window-common/src/partition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ impl<'a> PartitionEvaluatorArgs<'a> {
/// window function is reversible and is reversed.
/// * `ignore_nulls` - Set to `true` when `IGNORE NULLS` is
/// specified.
///
pub fn new(
input_exprs: &'a [Arc<dyn PhysicalExpr>],
input_fields: &'a [FieldRef],
Expand Down
1 change: 0 additions & 1 deletion datafusion/functions-window/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
//! implemented using the extension API.
//!
//! [DataFusion]: https://crates.io/crates/datafusion
//!

use std::sync::Arc;

Expand Down
1 change: 0 additions & 1 deletion datafusion/functions/benches/ltrim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ pub fn create_string_array_and_characters(
/// Outputs:
/// - testing string array
/// - trimmed characters
///
fn create_args(
size: usize,
characters: &str,
Expand Down
3 changes: 1 addition & 2 deletions datafusion/functions/src/core/expr_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ use super::expr_fn::get_field;
/// ```
/// # use datafusion_expr::{col};
/// # use datafusion_functions::core::expr_ext::FieldAccessor;
/// let expr = col("c1")
/// .field("my_field");
/// let expr = col("c1").field("my_field");
/// assert_eq!(expr.schema_name().to_string(), "c1[my_field]");
/// ```
pub trait FieldAccessor {
Expand Down
1 change: 0 additions & 1 deletion datafusion/functions/src/core/nullif.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ impl ScalarUDFImpl for NullIfFunc {
/// Implements NULLIF(expr1, expr2)
/// Args: 0 - left expr is any array
/// 1 - if the left is equal to this expr2, then the result is NULL, otherwise left value is passed.
///
fn nullif_func(args: &[ColumnarValue]) -> Result<ColumnarValue> {
let [lhs, rhs] = take_function_args("nullif", args)?;

Expand Down
2 changes: 0 additions & 2 deletions datafusion/functions/src/datetime/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ pub(crate) fn string_to_datetime_formatted<T: TimeZone>(
/// defined by `chrono`.
///
/// [`chrono::format::strftime`]: https://docs.rs/chrono/latest/chrono/format/strftime/index.html
///
#[inline]
pub(crate) fn string_to_timestamp_nanos_formatted(
s: &str,
Expand Down Expand Up @@ -169,7 +168,6 @@ pub(crate) fn string_to_timestamp_nanos_formatted(
/// defined by `chrono`.
///
/// [`chrono::format::strftime`]: https://docs.rs/chrono/latest/chrono/format/strftime/index.html
///
#[inline]
pub(crate) fn string_to_timestamp_millis_formatted(s: &str, format: &str) -> Result<i64> {
Ok(string_to_datetime_formatted(&Utc, s, format)?
Expand Down