diff --git a/src/function/covered_by.rs b/src/function/covered_by.rs index a17b13b..e0e9586 100644 --- a/src/function/covered_by.rs +++ b/src/function/covered_by.rs @@ -87,6 +87,10 @@ impl ScalarUDFImpl for CoveredByUdf { _ => unreachable!(), } } + + fn aliases(&self) -> &[String] { + &self.aliases + } } impl Default for CoveredByUdf { @@ -129,14 +133,18 @@ mod tests { ctx.register_udf(ScalarUDF::from(GeomFromTextUdf::new())); ctx.register_udf(ScalarUDF::from(CoveredByUdf::new())); let df = ctx - .sql("select ST_CoveredBy(ST_GeomFromText('LINESTRING ( 1 1, 0 2 )'), ST_GeomFromText('POINT(1 1)'))") + .sql("select ST_CoveredBy(ST_GeomFromText('POINT(1 1)'), ST_GeomFromText('LINESTRING ( 1 1, 0 2 )'))") .await .unwrap(); assert_eq!( pretty_format_batches(&df.collect().await.unwrap()) .unwrap() .to_string(), - "" + "+----------------------------------------------------------------------------------------------------+ +| ST_CoveredBy(ST_GeomFromText(Utf8(\"POINT(1 1)\")),ST_GeomFromText(Utf8(\"LINESTRING ( 1 1, 0 2 )\"))) | ++----------------------------------------------------------------------------------------------------+ +| true | ++----------------------------------------------------------------------------------------------------+" ); } } diff --git a/src/function/covers.rs b/src/function/covers.rs index 2b01797..779700e 100644 --- a/src/function/covers.rs +++ b/src/function/covers.rs @@ -88,6 +88,10 @@ impl ScalarUDFImpl for CoversUdf { _ => unreachable!(), } } + + fn aliases(&self) -> &[String] { + &self.aliases + } } impl Default for CoversUdf { @@ -137,7 +141,11 @@ mod tests { pretty_format_batches(&df.collect().await.unwrap()) .unwrap() .to_string(), - "" + "+-------------------------------------------------------------------------------------------------+ +| ST_Covers(ST_GeomFromText(Utf8(\"LINESTRING ( 1 1, 0 2 )\")),ST_GeomFromText(Utf8(\"POINT(1 1)\"))) | ++-------------------------------------------------------------------------------------------------+ +| true | ++-------------------------------------------------------------------------------------------------+" ); } } diff --git a/src/function/equals.rs b/src/function/equals.rs index 30d041f..be72dfc 100644 --- a/src/function/equals.rs +++ b/src/function/equals.rs @@ -88,6 +88,10 @@ impl ScalarUDFImpl for EqualsUdf { _ => unreachable!(), } } + + fn aliases(&self) -> &[String] { + &self.aliases + } } impl Default for EqualsUdf { @@ -137,7 +141,11 @@ mod tests { pretty_format_batches(&df.collect().await.unwrap()) .unwrap() .to_string(), - "" + "+-----------------------------------------------------------------------------------------------------------------+ +| ST_Equals(ST_GeomFromText(Utf8(\"LINESTRING(0 0, 10 10)\")),ST_GeomFromText(Utf8(\"LINESTRING(0 0, 5 5, 10 10)\"))) | ++-----------------------------------------------------------------------------------------------------------------+ +| true | ++-----------------------------------------------------------------------------------------------------------------+" ); } }