Skip to content

Commit

Permalink
chore: prune dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
roeap committed Jan 3, 2024
1 parent df560a6 commit 5185517
Show file tree
Hide file tree
Showing 28 changed files with 70 additions and 106 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ arrow-ord = { version = "48.0.1" }
arrow-row = { version = "48.0.1" }
arrow-schema = { version = "48.0.1" }
arrow-select = { version = "48.0.1" }
object_store = { version = "0.7.1" }
parquet = { version = "48.0.1" }

# datafusion
Expand All @@ -46,7 +47,7 @@ serde_json = "1"
# "stdlib"
bytes = { version = "1" }
chrono = { version = "0.4.31", default-features = false, features = ["clock"] }
log = { version = "0.4" }
tracing = { version = "0.1", features = ["log"] }
regex = { version = "1" }
thiserror = { version = "1" }
url = { version = "2" }
Expand Down
6 changes: 4 additions & 2 deletions crates/deltalake-aws/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ rusoto_core = { version = "0.47", default-features = false, optional = true }
rusoto_credential = { version = "0.47" }
rusoto_sts = { version = "0.47", default-features = false, optional = true }
rusoto_dynamodb = { version = "0.47", default-features = false, optional = true }
object_store = { version = "0.7.1", features = ["aws"]}
lazy_static = "1"
maplit = "1"

# workspace dependencies
async-trait = { workspace = true }
bytes = { workspace = true }
futures = { workspace = true }
log = { workspace = true }
tracing = { workspace = true }
object_store = { workspace = true, features = ["aws"]}
thiserror = { workspace = true }
tokio = { workspace = true }
regex = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/deltalake-aws/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ pub mod logstore;
pub mod storage;

use lazy_static::lazy_static;
use log::*;
use regex::Regex;
use std::{
collections::HashMap,
str::FromStr,
sync::Arc,
time::{Duration, SystemTime},
};
use tracing::debug;

use deltalake_core::logstore::{logstores, LogStore, LogStoreFactory};
use deltalake_core::storage::{factories, url_prefix_handler, ObjectStoreRef, StorageOptions};
Expand Down
2 changes: 1 addition & 1 deletion crates/deltalake-aws/src/logstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::{constants, CommitEntry, DynamoDbLockClient, UpdateLogEntryResult};

use bytes::Bytes;
use deltalake_core::{ObjectStoreError, Path};
use log::*;
use tracing::{debug, error, warn};
use url::Url;

use deltalake_core::logstore::*;
Expand Down
19 changes: 5 additions & 14 deletions crates/deltalake-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ tokio = { workspace = true, features = [

# other deps (these should be organized and pulled into workspace.dependencies as necessary)
cfg-if = "1"
dashmap = "5"
errno = "0.3"
either = "1.8"
fix-hidden-lifetime-bug = "0.2"
hyper = { version = "0.14", optional = true }
itertools = "0.11"
itertools = "0.12"
lazy_static = "1"
log = "0"
libc = ">=0.2.90, <1"
num-bigint = "0.4"
num-traits = "0.2.15"
Expand All @@ -83,7 +83,7 @@ once_cell = "1.16.0"
parking_lot = "0.12"
percent-encoding = "2"
roaring = "0.10.1"
tracing = { version = "0.1", optional = true }
tracing = { workspace = true }
rand = "0.8"
z85 = "3.0.5"
maplit = "1"
Expand All @@ -93,16 +93,8 @@ reqwest = { version = "0.11.18", default-features = false, features = [
"rustls-tls",
"json",
], optional = true }

# Datafusion
dashmap = "5"

sqlparser = { version = "0.39", optional = true }

# NOTE dependencies only for integration tests
fs_extra = { version = "1.3.0", optional = true }
tempdir = { version = "0", optional = true }

[dev-dependencies]
criterion = "0.5"
ctor = "0"
Expand All @@ -114,7 +106,6 @@ pretty_assertions = "1.2.1"
pretty_env_logger = "*"
rand = "0.8"
serial_test = "2"
tempdir = "0"
tempfile = "3"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
utime = "0.3"
Expand Down Expand Up @@ -147,10 +138,10 @@ datafusion = [
datafusion-ext = ["datafusion"]
gcs = ["object_store/gcp"]
# used only for integration testing
integration_test = ["fs_extra", "tempdir"]
integration_test = []
json = ["parquet/json"]
python = ["arrow/pyarrow"]
unity-experimental = ["reqwest", "tracing", "hyper"]
unity-experimental = ["reqwest", "hyper"]

[[bench]]
name = "read_checkpoint"
Expand Down
2 changes: 1 addition & 1 deletion crates/deltalake-core/src/delta_datafusion/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ use datafusion_sql::planner::ParserOptions;
use futures::TryStreamExt;

use itertools::Itertools;
use log::error;
use object_store::ObjectMeta;
use serde::{Deserialize, Serialize};
use tracing::error;
use url::Url;

use crate::errors::{DeltaResult, DeltaTableError};
Expand Down
2 changes: 1 addition & 1 deletion crates/deltalake-core/src/kernel/actions/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use std::str::FromStr;
// use std::sync::Arc;

// use roaring::RoaringTreemap;
use log::warn;
use serde::{Deserialize, Serialize};
use tracing::warn;
use url::Url;

use super::super::schema::StructType;
Expand Down
2 changes: 1 addition & 1 deletion crates/deltalake-core/src/logstore/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ use crate::{
DeltaTableError,
};
use bytes::Bytes;
use log::*;
use object_store::{path::Path, Error as ObjectStoreError, ObjectStore};
use tracing::{debug, warn};

#[cfg(feature = "datafusion")]
use datafusion::datasource::object_store::ObjectStoreUrl;
Expand Down
2 changes: 1 addition & 1 deletion crates/deltalake-core/src/operations/convert_to_delta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use futures::{
future::{self, BoxFuture},
TryStreamExt,
};
use log::{debug, info};
use parquet::{
arrow::async_reader::{ParquetObjectReader, ParquetRecordBatchStreamBuilder},
errors::ParquetError,
Expand All @@ -29,6 +28,7 @@ use std::{
str::{FromStr, Utf8Error},
sync::Arc,
};
use tracing::{debug, info};

/// Error converting a Parquet table to a Delta table
#[derive(Debug, thiserror::Error)]
Expand Down
6 changes: 3 additions & 3 deletions crates/deltalake-core/src/operations/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ mod tests {
use crate::operations::DeltaOps;
use crate::table::config::DeltaConfigKey;
use crate::writer::test_utils::get_delta_schema;
use tempdir::TempDir;
use tempfile::TempDir;

#[tokio::test]
async fn test_create() {
Expand All @@ -349,7 +349,7 @@ mod tests {
#[tokio::test]
async fn test_create_local_relative_path() {
let table_schema = get_delta_schema();
let tmp_dir = TempDir::new_in(".", "tmp_").unwrap();
let tmp_dir = TempDir::new_in(".").unwrap();
let relative_path = format!(
"./{}",
tmp_dir.path().file_name().unwrap().to_str().unwrap()
Expand All @@ -369,7 +369,7 @@ mod tests {
#[tokio::test]
async fn test_create_table_local_path() {
let schema = get_delta_schema();
let tmp_dir = TempDir::new_in(".", "tmp_").unwrap();
let tmp_dir = TempDir::new_in(".").unwrap();
let relative_path = format!(
"./{}",
tmp_dir.path().file_name().unwrap().to_str().unwrap()
Expand Down
2 changes: 1 addition & 1 deletion crates/deltalake-core/src/operations/optimize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ use futures::future::BoxFuture;
use futures::stream::BoxStream;
use futures::{Future, StreamExt, TryStreamExt};
use itertools::Itertools;
use log::debug;
use num_cpus;
use parquet::arrow::async_reader::{ParquetObjectReader, ParquetRecordBatchStreamBuilder};
use parquet::basic::{Compression, ZstdLevel};
use parquet::errors::ParquetError;
use parquet::file::properties::WriterProperties;
use serde::{Deserialize, Serialize};
use tracing::debug;

use super::transaction::{commit, PROTOCOL};
use super::writer::{PartitionWriter, PartitionWriterConfig};
Expand Down
2 changes: 1 addition & 1 deletion crates/deltalake-core/src/operations/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ mod tests {

#[tokio::test]
async fn test_special_characters_write_read() {
let tmp_dir = tempdir::TempDir::new("test").unwrap();
let tmp_dir = tempfile::tempdir().unwrap();
let tmp_path = std::fs::canonicalize(tmp_dir.path()).unwrap();

let schema = Arc::new(ArrowSchema::new(vec![
Expand Down
3 changes: 2 additions & 1 deletion crates/deltalake-core/src/operations/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use object_store::{path::Path, ObjectStore};
use parquet::arrow::ArrowWriter;
use parquet::basic::Compression;
use parquet::file::properties::WriterProperties;
use tracing::debug;

use crate::crate_version;
use crate::errors::{DeltaResult, DeltaTableError};
Expand Down Expand Up @@ -380,7 +381,7 @@ impl PartitionWriter {
self.write_batch(&batch.slice(offset, length))?;
// flush currently buffered data to disk once we meet or exceed the target file size.
if self.buffer.len() >= self.config.target_file_size {
log::debug!("Writing file with size {:?} to disk.", self.buffer.len());
debug!("Writing file with size {:?} to disk.", self.buffer.len());
self.flush_arrow_writer().await?;
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/deltalake-core/src/protocol/checkpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ use arrow_schema::{ArrowError, Schema as ArrowSchema};
use chrono::{Datelike, Utc};
use futures::{StreamExt, TryStreamExt};
use lazy_static::lazy_static;
use log::*;
use object_store::ObjectStore;
use parquet::arrow::ArrowWriter;
use parquet::errors::ParquetError;
use regex::Regex;
use serde_json::Value;
use tracing::{debug, error};

use super::{time_utils, ProtocolError};
use crate::kernel::arrow::delta_log_schema_for_table;
Expand Down
4 changes: 2 additions & 2 deletions crates/deltalake-core/src/protocol/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ mod time_utils;
use arrow_schema::ArrowError;
use futures::StreamExt;
use lazy_static::lazy_static;
use log::debug;
use object_store::{path::Path, Error as ObjectStoreError, ObjectStore};
use regex::Regex;
use serde::{Deserialize, Serialize};
Expand All @@ -22,6 +21,7 @@ use std::collections::HashMap;
use std::hash::{Hash, Hasher};
use std::mem::take;
use std::str::FromStr;
use tracing::{debug, error};

use crate::errors::{DeltaResult, DeltaTableError};
use crate::kernel::{Add, CommitInfo, Metadata, Protocol, Remove};
Expand Down Expand Up @@ -266,7 +266,7 @@ impl Add {
Ok(Some(stats)) => Ok(Some(stats)),
Ok(None) => self.get_json_stats(),
Err(e) => {
log::error!(
error!(
"Error when reading parquet stats {:?} {e}. Attempting to read json stats",
self.stats_parsed
);
Expand Down
Loading

0 comments on commit 5185517

Please sign in to comment.