refactor: Use re-exported arrow mod from datatypes crate (#571)

This commit is contained in:
Yingwen
2022-11-18 18:38:07 +08:00
committed by GitHub
parent e1f326295f
commit 22ae983280
31 changed files with 57 additions and 155 deletions

View File

@@ -903,7 +903,7 @@ pub(crate) mod greptime_builtin {
duration: i64,
vm: &VirtualMachine,
) -> PyResult<Vec<PrimitiveScalar<i64>>> {
use arrow::datatypes::DataType;
use datatypes::arrow::datatypes::DataType;
match (oldest.data_type(), newest.data_type()) {
(DataType::Int64, DataType::Int64) => (),
_ => {

View File

@@ -18,9 +18,9 @@ use std::io::Read;
use std::path::Path;
use std::sync::Arc;
use arrow::array::{Float64Array, Int64Array, PrimitiveArray};
use arrow::compute::cast::CastOptions;
use arrow::datatypes::DataType;
use datatypes::arrow::array::{Float64Array, Int64Array, PrimitiveArray};
use datatypes::arrow::compute::cast::CastOptions;
use datatypes::arrow::datatypes::DataType;
use datatypes::vectors::VectorRef;
use ron::from_str as from_ron_string;
use rustpython_vm::builtins::{PyFloat, PyInt, PyList};
@@ -30,9 +30,10 @@ use rustpython_vm::scope::Scope;
use rustpython_vm::{AsObject, PyObjectRef, VirtualMachine};
use serde::{Deserialize, Serialize};
use super::{greptime_builtin, *};
use super::*;
use crate::python::utils::{format_py_error, is_instance};
use crate::python::PyVector;
#[test]
fn convert_scalar_to_py_obj_and_back() {
rustpython_vm::Interpreter::with_init(Default::default(), |vm| {

View File

@@ -327,8 +327,8 @@ fn set_items_in_scope(
/// ```ignore
/// use std::sync::Arc;
/// use datafusion_common::record_batch::RecordBatch as DfRecordBatch;
/// use arrow::array::PrimitiveArray;
/// use arrow::datatypes::{DataType, Field, Schema};
/// use datatypes::arrow::array::PrimitiveArray;
/// use datatypes::arrow::datatypes::{DataType, Field, Schema};
/// use common_function::scalars::python::exec_coprocessor;
/// let python_source = r#"
/// @copr(args=["cpu", "mem"], returns=["perf", "what"])