Skip to content

Commit e9c08d9

Browse files
committed
feat: add ST_NumPoints alias for ST_NPoints
Closes part of #200.
1 parent 95f3ecf commit e9c08d9

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

rust/sedona-functions/src/st_points.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ pub fn st_npoints_udf() -> SedonaScalarUDF {
115115
ItemCrsKernel::wrap_impl(vec![Arc::new(STNPoints)]),
116116
Volatility::Immutable,
117117
)
118+
.with_aliases(vec!["st_numpoints".to_string()])
118119
}
119120

120121
#[derive(Debug)]
@@ -296,6 +297,12 @@ mod tests {
296297
assert!(st_npoints_udf.documentation().is_none());
297298
}
298299

300+
#[test]
301+
fn npoints_aliases() {
302+
let udf: ScalarUDF = st_npoints_udf().into();
303+
assert!(udf.aliases().contains(&"st_numpoints".to_string()));
304+
}
305+
299306
#[rstest]
300307
fn udf(#[values(WKB_GEOMETRY, WKB_GEOGRAPHY)] sedona_type: SedonaType) {
301308
use arrow_array::UInt64Array;

0 commit comments

Comments
 (0)