Skip to content

Commit

Permalink
fix rustdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Sep 11, 2024
1 parent 6610a8f commit 5db0be7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion datafusion/functions/src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ make_udf_function!(r#struct::StructFunc, STRUCT, r#struct);
make_udf_function!(named_struct::NamedStructFunc, NAMED_STRUCT, named_struct);
make_udf_function!(getfield::GetFieldFunc, GET_FIELD, get_field);
make_udf_function!(coalesce::CoalesceFunc, COALESCE, coalesce);
make_udf_function!(version::Version, VERSION, version);
make_udf_function!(version::VersionFunc, VERSION, version);

pub mod expr_fn {
use datafusion_expr::{Expr, Literal};
Expand Down
10 changes: 5 additions & 5 deletions datafusion/functions/src/core/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@ use datafusion_common::{not_impl_err, plan_err, Result, ScalarValue};
use datafusion_expr::{ColumnarValue, ScalarUDFImpl, Signature, Volatility};

#[derive(Debug)]
pub struct Version {
pub struct VersionFunc {
signature: Signature,
}

impl Default for Version {
impl Default for VersionFunc {
fn default() -> Self {
Self::new()
}
}

impl Version {
impl VersionFunc {
pub fn new() -> Self {
Self {
signature: Signature::exact(vec![], Volatility::Immutable),
}
}
}

impl ScalarUDFImpl for Version {
impl ScalarUDFImpl for VersionFunc {
fn as_any(&self) -> &dyn Any {
self
}
Expand Down Expand Up @@ -87,7 +87,7 @@ mod test {

#[tokio::test]
async fn test_version_udf() {
let version_udf = ScalarUDF::from(Version::new());
let version_udf = ScalarUDF::from(VersionFunc::new());
let version = version_udf.invoke_no_args(0).unwrap();

if let ColumnarValue::Scalar(ScalarValue::Utf8(Some(version))) = version {
Expand Down

0 comments on commit 5db0be7

Please sign in to comment.