From 436c398f4c08232db1acc377132dcb2a89bb7149 Mon Sep 17 00:00:00 2001 From: Robert Pack Date: Fri, 14 Apr 2023 20:05:31 +0200 Subject: [PATCH] feat: use arrow-sub crates --- azure-kusto-data/Cargo.toml | 32 +++++++++++++----------- azure-kusto-data/src/arrow.rs | 12 +++------ azure-kusto-data/src/operations/query.rs | 2 +- 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/azure-kusto-data/Cargo.toml b/azure-kusto-data/Cargo.toml index eb67e92..7bd53f7 100644 --- a/azure-kusto-data/Cargo.toml +++ b/azure-kusto-data/Cargo.toml @@ -13,45 +13,47 @@ keywords = ["sdk", "azure", "kusto", "azure-data-explorer"] categories = ["api-bindings"] [dependencies] -arrow = { version = "33.0.0", optional = true } -azure_core = { version = "0.10.0", features = [ +arrow-array = { version = "42", optional = true } +arrow-schema = { version = "42", optional = true } +azure_core = { version = "0.13", features = [ "enable_reqwest", "enable_reqwest_gzip", ] } -azure_identity = "0.10.0" +azure_identity = "0.13.0" async-trait = "0.1.64" async-convert = "1.0.0" -bytes = "1.4.0" -futures = "0.3.26" -serde = { version = "1.0.152", features = ["derive"] } -serde_json = "1.0.93" -serde_with = { version = "2.2.0", features = ["json"] } +bytes = "1.4" +futures = "0.3" +serde = { version = "1", features = ["derive"] } +serde_json = "1" +serde_with = { version = "3", features = ["json"] } thiserror = "1.0.38" -hashbrown = { version = "0.13.2", features = ["serde"] } +hashbrown = { version = "0.14", features = ["serde"] } regex = "1.7.1" -time = { version = "0.3.19", features = [ +time = { version = "0.3", features = [ "serde", "parsing", "formatting", "macros", "serde-well-known", ] } -derive_builder = "0.12.0" -once_cell = "1.17.1" +derive_builder = "0.12" +once_cell = "1" [dev-dependencies] -arrow = { version = "33.0.0", features = ["prettyprint"] } +arrow = { version = "42", features = ["prettyprint"] } dotenv = "0.15.0" env_logger = "0.10.0" tokio = { version = "1.25.0", features = ["macros"] } oauth2 = "4.3.0" -criterion = "0.4.0" +criterion = "0.5" clap = { version = "4.1.6", features = ["derive", "env"] } decimal = "2.1.0" -uuid = { version = "1.3.0", features = [ "serde"] } +uuid = { version = "1.3.0", features = ["serde"] } [features] default = ["arrow"] +arrow = ["arrow-array", "arrow-schema"] test_e2e = [] [[bench]] diff --git a/azure-kusto-data/src/arrow.rs b/azure-kusto-data/src/arrow.rs index f29f2a7..bd3aab8 100644 --- a/azure-kusto-data/src/arrow.rs +++ b/azure-kusto-data/src/arrow.rs @@ -3,15 +3,11 @@ use std::convert::TryInto; use std::str::FromStr; use std::sync::Arc; -use arrow::array::TimestampNanosecondArray; -use arrow::{ - array::{ - ArrayRef, BooleanArray, DurationNanosecondArray, Float64Array, Int32Array, Int64Array, - StringArray, - }, - datatypes::{DataType, Field, Schema, TimeUnit}, - record_batch::RecordBatch, +use arrow_array::{ + ArrayRef, BooleanArray, DurationNanosecondArray, Float64Array, Int32Array, Int64Array, + RecordBatch, StringArray, TimestampNanosecondArray, }; +use arrow_schema::{DataType, Field, Schema, TimeUnit}; use azure_core::error::{ErrorKind, ResultExt}; use serde_json::Value; diff --git a/azure-kusto-data/src/operations/query.rs b/azure-kusto-data/src/operations/query.rs index 4dcba29..0d7ee4a 100644 --- a/azure-kusto-data/src/operations/query.rs +++ b/azure-kusto-data/src/operations/query.rs @@ -7,7 +7,7 @@ use crate::models::{DataTable, QueryBody, TableFragmentType, TableKind, TableV1, use crate::operations::async_deserializer; use crate::prelude::ClientRequestProperties; #[cfg(feature = "arrow")] -use arrow::record_batch::RecordBatch; +use arrow_array::RecordBatch; use async_convert::TryFrom; use azure_core::error::Error as CoreError; use azure_core::headers::Headers;