Skip to content

Commit 54ce8ae

Browse files
Making sd_format show geospatial values in arrays and structs properly (#1)
* Start to implement a more generic sd_format function * Now it is working * Make tests more comprehensive * Support list view * Fix clippy warnings * Update rust/sedona-functions/src/sd_format.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 01b613a commit 54ce8ae

2 files changed

Lines changed: 791 additions & 52 deletions

File tree

rust/sedona-expr/src/scalar_udf.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,11 @@ impl ArgMatcher {
182182
arg_iter.next().is_none()
183183
}
184184

185+
/// Matches any argument
186+
pub fn is_any() -> Arc<dyn TypeMatcher + Send + Sync> {
187+
Arc::new(IsAny {})
188+
}
189+
185190
/// Matches the given Arrow type using PartialEq
186191
pub fn is_arrow(data_type: DataType) -> Arc<dyn TypeMatcher + Send + Sync> {
187192
Arc::new(IsExact {
@@ -239,6 +244,15 @@ pub trait TypeMatcher: Debug {
239244
}
240245
}
241246

247+
#[derive(Debug)]
248+
struct IsAny;
249+
250+
impl TypeMatcher for IsAny {
251+
fn match_type(&self, _arg: &SedonaType) -> bool {
252+
true
253+
}
254+
}
255+
242256
#[derive(Debug)]
243257
struct IsExact {
244258
exact_type: SedonaType,

0 commit comments

Comments
 (0)