Skip to content

Commit

Permalink
[Minor] refactor: make ArraySort public for broader access (#14006)
Browse files Browse the repository at this point in the history
* refactor: make ArraySort public for broader access

Changes the visibility of the ArraySort struct fromsuper to public. allows broader access to the 
struct, enabling its use in other modules and 
promoting better code reuse.

* clippy and docs

---------

Co-authored-by: Andrew Lamb <[email protected]>
  • Loading branch information
dharanad and alamb authored Jan 6, 2025
1 parent c2e4747 commit cad39e0
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion datafusion/functions-nested/src/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ make_udf_expr_and_func!(
array_sort_udf
);

/// Implementation of `array_sort` function
///
/// `array_sort` sorts the elements of an array
///
/// # Example
///
/// `array_sort([3, 1, 2])` returns `[1, 2, 3]`
#[user_doc(
doc_section(label = "Array Functions"),
description = "Sort array.",
Expand All @@ -66,11 +73,17 @@ make_udf_expr_and_func!(
)
)]
#[derive(Debug)]
pub(super) struct ArraySort {
pub struct ArraySort {
signature: Signature,
aliases: Vec<String>,
}

impl Default for ArraySort {
fn default() -> Self {
Self::new()
}
}

impl ArraySort {
pub fn new() -> Self {
Self {
Expand Down

0 comments on commit cad39e0

Please sign in to comment.