Skip to content

Commit

Permalink
return arrow2 dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatolyBuga committed Aug 1, 2023
1 parent c5a559e commit db176c7
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion connectorx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ serde_json = "1"
chrono = "0.4"

arrow = {version = "26", optional = true, features = ["prettyprint", "ffi"]}
arrow2 = {version = "0.17.3", default-features = false, optional = true}
bb8 = {version = "0.7", optional = true}
bb8-tiberius = {version = "0.5", optional = true}
csv = {version = "1", optional = true}
Expand Down Expand Up @@ -72,7 +73,7 @@ all = ["src_sqlite", "src_postgres", "src_mysql", "src_mssql", "src_oracle", "sr
branch = []
default = ["fptr"]
dst_arrow = ["arrow"]
dst_arrow2 = ["polars"]
dst_arrow2 = ["polars", "arrow2"]
fptr = []
src_bigquery = ["gcp-bigquery-client", "tokio"]
src_csv = ["csv", "regex"]
Expand Down
4 changes: 2 additions & 2 deletions connectorx/src/destinations/arrow2/arrow_assoc.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use polars::export::arrow::array::*;
use polars::export::arrow::datatypes::{DataType as ArrowDataType, Field, TimeUnit};
use arrow2::array::*;
use arrow2::datatypes::{DataType as ArrowDataType, Field, TimeUnit};

use chrono::{Date, DateTime, NaiveDate, NaiveDateTime, NaiveTime, Timelike, Utc};

Expand Down
2 changes: 1 addition & 1 deletion connectorx/src/destinations/arrow2/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub type Result<T> = std::result::Result<T, Arrow2DestinationError>;
#[derive(Error, Debug)]
pub enum Arrow2DestinationError {
#[error(transparent)]
ArrowError(#[from] polars::export::arrow::error::Error),
ArrowError(#[from] arrow2::error::Error),

#[error(transparent)]
PolarsError(#[from] polars::error::PolarsError),
Expand Down
4 changes: 2 additions & 2 deletions connectorx/src/destinations/arrow2/funcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use super::Builder;
use crate::errors::Result;
use crate::typesystem::{ParameterizedFunc, ParameterizedOn};
use anyhow::anyhow;
use polars::export::arrow::datatypes::Field;
use arrow2::datatypes::Field;
use std::sync::Arc;
use polars::export::arrow::array::{Array, MutableArray};
use arrow2::array::{Array, MutableArray};

pub struct FNewBuilder;

Expand Down
6 changes: 3 additions & 3 deletions connectorx/src/destinations/arrow2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ use crate::constants::RECORD_BATCH_SIZE;
use crate::data_order::DataOrder;
use crate::typesystem::{Realize, TypeAssoc, TypeSystem};
use anyhow::anyhow;
use polars::export::arrow::array::{Array, MutableArray};
use polars::export::arrow::chunk::Chunk;
use polars::export::arrow::datatypes::{Schema, Field};
use arrow2::array::{Array, MutableArray};
use arrow2::chunk::Chunk;
use arrow2::datatypes::{Schema, Field};
use arrow_assoc::ArrowAssoc;
pub use errors::{Arrow2DestinationError, Result};
use fehler::throw;
Expand Down

0 comments on commit db176c7

Please sign in to comment.