Skip to content

Commit 1b63a6b

Browse files
committed
fix doc test
1 parent 7cbbd5a commit 1b63a6b

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

datafusion-common/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
mod column;
1919
mod dfschema;
2020
mod error;
21+
#[cfg(feature = "pyarrow")]
22+
mod pyarrow;
2123
mod scalar;
2224

2325
pub use column::Column;

datafusion/src/pyarrow.rs renamed to datafusion-common/src/pyarrow.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
use pyo3::prelude::*;
19-
use pyo3::types::PyList;
18+
//! PyArrow
2019
21-
use crate::arrow::array::ArrayData;
22-
use crate::arrow::pyarrow::PyArrowConvert;
23-
use crate::scalar::ScalarValue;
20+
use crate::ScalarValue;
21+
use arrow::array::ArrayData;
22+
use arrow::pyarrow::PyArrowConvert;
23+
use pyo3::types::PyList;
24+
use pyo3::{FromPyObject, IntoPy, PyAny, PyObject, PyResult, Python};
2425

2526
impl PyArrowConvert for ScalarValue {
2627
fn from_pyarrow(value: &PyAny) -> PyResult<Self> {
@@ -68,7 +69,6 @@ mod tests {
6869
use pyo3::prepare_freethreaded_python;
6970
use pyo3::py_run;
7071
use pyo3::types::PyDict;
71-
use pyo3::Python;
7272

7373
fn init_python() {
7474
prepare_freethreaded_python();

datafusion-common/src/scalar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ impl ScalarValue {
665665
///
666666
/// Example
667667
/// ```
668-
/// use datafusion::scalar::ScalarValue;
668+
/// use datafusion_common::ScalarValue;
669669
/// use arrow::array::{ArrayRef, BooleanArray};
670670
///
671671
/// let scalars = vec![

datafusion/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,6 @@ pub use parquet;
224224

225225
pub(crate) mod field_util;
226226

227-
#[cfg(feature = "pyarrow")]
228-
mod pyarrow;
229-
230227
pub mod from_slice;
231228

232229
#[cfg(test)]

0 commit comments

Comments
 (0)