diff --git a/crates/util/src/lib.rs b/crates/util/src/lib.rs index 5b1c89936..267a8b86a 100644 --- a/crates/util/src/lib.rs +++ b/crates/util/src/lib.rs @@ -32,9 +32,9 @@ use tokio::runtime::Runtime; use tokio::task::JoinHandle; use tokio::time::sleep; -use crate::errors::{PyDataFusionError, PyDataFusionResult, to_datafusion_err}; - pub mod errors; +pub use crate::errors::to_datafusion_err; +use crate::errors::{PyDataFusionError, PyDataFusionResult}; /// Utility to get the Tokio Runtime from Python #[inline] diff --git a/crates/util/tests/root_exports.rs b/crates/util/tests/root_exports.rs new file mode 100644 index 000000000..e630cd954 --- /dev/null +++ b/crates/util/tests/root_exports.rs @@ -0,0 +1,23 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use datafusion_python_util::to_datafusion_err; + +#[test] +fn exports_to_datafusion_err_from_crate_root() { + let _ = to_datafusion_err("importable from crate root"); +}