Skip to content

Commit

Permalink
Rename SetMasklen to SetMaskLen
Browse files Browse the repository at this point in the history
  • Loading branch information
dadepo committed Apr 20, 2024
1 parent d927c56 commit 6b1e13d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/postgres/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use crate::postgres::math_udfs::{
};
use crate::postgres::network_udfs::{
broadcast, family, host, hostmask, inet_merge, inet_same_family, MaskLen, Netmask, Network,
SetMasklen,
SetMaskLen,
};

mod math_udfs;
Expand Down Expand Up @@ -52,7 +52,7 @@ fn register_network_udfs(ctx: &SessionContext) -> Result<()> {
ctx.register_udf(ScalarUDF::from(MaskLen::new()));
ctx.register_udf(ScalarUDF::from(Netmask::new()));
ctx.register_udf(ScalarUDF::from(Network::new()));
ctx.register_udf(ScalarUDF::from(SetMasklen::new()));
ctx.register_udf(ScalarUDF::from(SetMaskLen::new()));
Ok(())
}

Expand Down
6 changes: 3 additions & 3 deletions src/postgres/network_udfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,19 +435,19 @@ 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 SetMasklen {
pub struct SetMaskLen {
signature: Signature,
}

impl SetMasklen {
impl SetMaskLen {
pub fn new() -> Self {
Self {
signature: Signature::exact(vec![Utf8, Int64], Volatility::Immutable),
}
}
}

impl ScalarUDFImpl for SetMasklen {
impl ScalarUDFImpl for SetMaskLen {
fn as_any(&self) -> &dyn std::any::Any {
self
}
Expand Down

0 comments on commit 6b1e13d

Please sign in to comment.