Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport to 37: make udf structs public #10107

Merged
merged 1 commit into from
Apr 17, 2024
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
24 changes: 21 additions & 3 deletions datafusion/functions-array/src/array_has.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,17 @@ make_udf_function!(ArrayHasAny,
);

#[derive(Debug)]
pub(super) struct ArrayHas {
pub struct ArrayHas {
signature: Signature,
aliases: Vec<String>,
}

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

impl ArrayHas {
pub fn new() -> Self {
Self {
Expand Down Expand Up @@ -121,11 +127,17 @@ impl ScalarUDFImpl for ArrayHas {
}

#[derive(Debug)]
pub(super) struct ArrayHasAll {
pub struct ArrayHasAll {
signature: Signature,
aliases: Vec<String>,
}

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

impl ArrayHasAll {
pub fn new() -> Self {
Self {
Expand Down Expand Up @@ -178,11 +190,17 @@ impl ScalarUDFImpl for ArrayHasAll {
}

#[derive(Debug)]
pub(super) struct ArrayHasAny {
pub struct ArrayHasAny {
signature: Signature,
aliases: Vec<String>,
}

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

impl ArrayHasAny {
pub fn new() -> Self {
Self {
Expand Down
24 changes: 21 additions & 3 deletions datafusion/functions-array/src/concat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,17 @@ make_udf_function!(
);

#[derive(Debug)]
pub(super) struct ArrayAppend {
pub struct ArrayAppend {
signature: Signature,
aliases: Vec<String>,
}

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

impl ArrayAppend {
pub fn new() -> Self {
Self {
Expand Down Expand Up @@ -99,11 +105,17 @@ make_udf_function!(
);

#[derive(Debug)]
pub(super) struct ArrayPrepend {
pub struct ArrayPrepend {
signature: Signature,
aliases: Vec<String>,
}

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

impl ArrayPrepend {
pub fn new() -> Self {
Self {
Expand Down Expand Up @@ -152,11 +164,17 @@ make_udf_function!(
);

#[derive(Debug)]
pub(super) struct ArrayConcat {
pub struct ArrayConcat {
signature: Signature,
aliases: Vec<String>,
}

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

impl ArrayConcat {
pub fn new() -> Self {
Self {
Expand Down
44 changes: 22 additions & 22 deletions datafusion/functions-array/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,28 @@
#[macro_use]
pub mod macros;

mod array_has;
mod cardinality;
mod concat;
mod dimension;
mod empty;
mod except;
mod extract;
mod flatten;
mod length;
mod make_array;
mod position;
mod range;
mod remove;
mod repeat;
mod replace;
mod resize;
mod reverse;
mod rewrite;
mod set_ops;
mod sort;
mod string;
mod utils;
pub mod array_has;
pub mod cardinality;
pub mod concat;
pub mod dimension;
pub mod empty;
pub mod except;
pub mod extract;
pub mod flatten;
pub mod length;
pub mod make_array;
pub mod position;
pub mod range;
pub mod remove;
pub mod repeat;
pub mod replace;
pub mod resize;
pub mod reverse;
pub mod rewrite;
pub mod set_ops;
pub mod sort;
pub mod string;
pub mod utils;

use datafusion_common::Result;
use datafusion_execution::FunctionRegistry;
Expand Down
6 changes: 6 additions & 0 deletions datafusion/functions-array/src/make_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ pub struct MakeArray {
aliases: Vec<String>,
}

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

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