diff --git a/src/postgres/mod.rs b/src/postgres/mod.rs index a6b1067..d62162a 100644 --- a/src/postgres/mod.rs +++ b/src/postgres/mod.rs @@ -13,7 +13,7 @@ use crate::postgres::math_udfs::{ Acosd, Asind, Atand, Ceiling, Cosd, Cotd, Div, Erf, Erfc, RandomNormal, Sind, Tand, }; use crate::postgres::network_udfs::{ - broadcast, family, host, hostmask, inet_merge, inet_same_family, masklen, Masklen, Netmask, + broadcast, family, host, hostmask, inet_merge, inet_same_family, masklen, SetMasklen, Netmask, Network, }; @@ -52,7 +52,7 @@ fn register_network_udfs(ctx: &SessionContext) -> Result<()> { register_masklen(ctx); ctx.register_udf(ScalarUDF::from(Netmask::new())); ctx.register_udf(ScalarUDF::from(Network::new())); - ctx.register_udf(ScalarUDF::from(Masklen::new())); + ctx.register_udf(ScalarUDF::from(SetMasklen::new())); Ok(()) } diff --git a/src/postgres/network_udfs.rs b/src/postgres/network_udfs.rs index 7a5f5db..3418d15 100644 --- a/src/postgres/network_udfs.rs +++ b/src/postgres/network_udfs.rs @@ -399,11 +399,11 @@ impl ScalarUDFImpl for Network { /// If the input is a CIDR, Address bits to the right of the new netmask are set to zero. /// Returns NULL if any of the columns contain NULL values. #[derive(Debug)] -pub struct Masklen { +pub struct SetMasklen { signature: Signature, } -impl Masklen { +impl SetMasklen { pub fn new() -> Self { Self { signature: Signature::exact(vec![Utf8, Int64], Volatility::Immutable), @@ -411,7 +411,7 @@ impl Masklen { } } -impl ScalarUDFImpl for Masklen { +impl ScalarUDFImpl for SetMasklen { fn as_any(&self) -> &dyn std::any::Any { self }