Skip to content

Commit 760500b

Browse files
refactor: make all udf function impls public (#9903)
* refactor: make all udf function impls public * clippy
1 parent f5805b7 commit 760500b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1209
-117
lines changed

datafusion/functions-array/src/array_has.rs

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,17 @@ make_udf_function!(ArrayHasAny,
5454
);
5555

5656
#[derive(Debug)]
57-
pub(super) struct ArrayHas {
57+
pub struct ArrayHas {
5858
signature: Signature,
5959
aliases: Vec<String>,
6060
}
6161

62+
impl Default for ArrayHas {
63+
fn default() -> Self {
64+
Self::new()
65+
}
66+
}
67+
6268
impl ArrayHas {
6369
pub fn new() -> Self {
6470
Self {
@@ -121,11 +127,17 @@ impl ScalarUDFImpl for ArrayHas {
121127
}
122128

123129
#[derive(Debug)]
124-
pub(super) struct ArrayHasAll {
130+
pub struct ArrayHasAll {
125131
signature: Signature,
126132
aliases: Vec<String>,
127133
}
128134

135+
impl Default for ArrayHasAll {
136+
fn default() -> Self {
137+
Self::new()
138+
}
139+
}
140+
129141
impl ArrayHasAll {
130142
pub fn new() -> Self {
131143
Self {
@@ -178,11 +190,17 @@ impl ScalarUDFImpl for ArrayHasAll {
178190
}
179191

180192
#[derive(Debug)]
181-
pub(super) struct ArrayHasAny {
193+
pub struct ArrayHasAny {
182194
signature: Signature,
183195
aliases: Vec<String>,
184196
}
185197

198+
impl Default for ArrayHasAny {
199+
fn default() -> Self {
200+
Self::new()
201+
}
202+
}
203+
186204
impl ArrayHasAny {
187205
pub fn new() -> Self {
188206
Self {

datafusion/functions-array/src/concat.rs

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,17 @@ make_udf_function!(
4545
);
4646

4747
#[derive(Debug)]
48-
pub(super) struct ArrayAppend {
48+
pub struct ArrayAppend {
4949
signature: Signature,
5050
aliases: Vec<String>,
5151
}
5252

53+
impl Default for ArrayAppend {
54+
fn default() -> Self {
55+
Self::new()
56+
}
57+
}
58+
5359
impl ArrayAppend {
5460
pub fn new() -> Self {
5561
Self {
@@ -99,11 +105,17 @@ make_udf_function!(
99105
);
100106

101107
#[derive(Debug)]
102-
pub(super) struct ArrayPrepend {
108+
pub struct ArrayPrepend {
103109
signature: Signature,
104110
aliases: Vec<String>,
105111
}
106112

113+
impl Default for ArrayPrepend {
114+
fn default() -> Self {
115+
Self::new()
116+
}
117+
}
118+
107119
impl ArrayPrepend {
108120
pub fn new() -> Self {
109121
Self {
@@ -152,11 +164,17 @@ make_udf_function!(
152164
);
153165

154166
#[derive(Debug)]
155-
pub(super) struct ArrayConcat {
167+
pub struct ArrayConcat {
156168
signature: Signature,
157169
aliases: Vec<String>,
158170
}
159171

172+
impl Default for ArrayConcat {
173+
fn default() -> Self {
174+
Self::new()
175+
}
176+
}
177+
160178
impl ArrayConcat {
161179
pub fn new() -> Self {
162180
Self {

datafusion/functions-array/src/lib.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,28 @@
2828
#[macro_use]
2929
pub mod macros;
3030

31-
mod array_has;
32-
mod cardinality;
33-
mod concat;
34-
mod dimension;
35-
mod empty;
36-
mod except;
37-
mod extract;
38-
mod flatten;
39-
mod length;
40-
mod make_array;
41-
mod position;
42-
mod range;
43-
mod remove;
44-
mod repeat;
45-
mod replace;
46-
mod resize;
47-
mod reverse;
48-
mod rewrite;
49-
mod set_ops;
50-
mod sort;
51-
mod string;
52-
mod utils;
31+
pub mod array_has;
32+
pub mod cardinality;
33+
pub mod concat;
34+
pub mod dimension;
35+
pub mod empty;
36+
pub mod except;
37+
pub mod extract;
38+
pub mod flatten;
39+
pub mod length;
40+
pub mod make_array;
41+
pub mod position;
42+
pub mod range;
43+
pub mod remove;
44+
pub mod repeat;
45+
pub mod replace;
46+
pub mod resize;
47+
pub mod reverse;
48+
pub mod rewrite;
49+
pub mod set_ops;
50+
pub mod sort;
51+
pub mod string;
52+
pub mod utils;
5353

5454
use datafusion_common::Result;
5555
use datafusion_execution::FunctionRegistry;

datafusion/functions-array/src/make_array.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ pub struct MakeArray {
4848
aliases: Vec<String>,
4949
}
5050

51+
impl Default for MakeArray {
52+
fn default() -> Self {
53+
Self::new()
54+
}
55+
}
56+
5157
impl MakeArray {
5258
pub fn new() -> Self {
5359
Self {

0 commit comments

Comments
 (0)