Skip to content

Commit 0194a27

Browse files
yahoNanJingyangzhong
andauthored
Split datafusion-object-store module (#2065)
* split datafusion-object-store module * Fix for PR review Co-authored-by: yangzhong <yangzhong@ebay.com>
1 parent 257d030 commit 0194a27

File tree

48 files changed

+502
-395
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+502
-395
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ members = [
2525
"datafusion-cli",
2626
"datafusion-examples",
2727
"datafusion-proto",
28+
"datafusion-storage",
2829
"benchmarks",
2930
"ballista/rust/client",
3031
"ballista/rust/core",

ballista/rust/core/src/serde/logical_plan/mod.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -885,14 +885,17 @@ mod roundtrip_tests {
885885
use crate::serde::{AsLogicalPlan, BallistaCodec};
886886
use async_trait::async_trait;
887887
use core::panic;
888-
use datafusion::datasource::listing::ListingTable;
889-
use datafusion::datasource::object_store::{
890-
FileMetaStream, ListEntryStream, ObjectReader, ObjectStore, SizedFile,
888+
use datafusion::datafusion_storage::{
889+
object_store::{
890+
local::LocalFileSystem, FileMetaStream, ListEntryStream, ObjectReader,
891+
ObjectStore,
892+
},
893+
SizedFile,
891894
};
895+
use datafusion::datasource::listing::ListingTable;
892896
use datafusion::error::DataFusionError;
893897
use datafusion::{
894898
arrow::datatypes::{DataType, Field, Schema},
895-
datasource::object_store::local::LocalFileSystem,
896899
logical_plan::{
897900
col, CreateExternalTable, Expr, LogicalPlan, LogicalPlanBuilder, Repartition,
898901
ToDFSchema,

ballista/rust/core/src/serde/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ fn str_to_byte(s: &str) -> Result<u8, BallistaError> {
347347
mod tests {
348348
use async_trait::async_trait;
349349
use datafusion::arrow::datatypes::SchemaRef;
350-
use datafusion::datasource::object_store::local::LocalFileSystem;
350+
use datafusion::datafusion_storage::object_store::local::LocalFileSystem;
351351
use datafusion::error::DataFusionError;
352352
use datafusion::execution::context::{QueryPlanner, SessionState, TaskContext};
353353
use datafusion::execution::runtime_env::{RuntimeConfig, RuntimeEnv};

ballista/rust/core/src/serde/physical_plan/from_proto.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ use crate::serde::{from_proto_binary_op, proto_error, protobuf};
2626
use crate::{convert_box_required, convert_required};
2727
use chrono::{TimeZone, Utc};
2828

29-
use datafusion::datasource::object_store::local::LocalFileSystem;
30-
use datafusion::datasource::object_store::{FileMeta, SizedFile};
31-
use datafusion::datasource::PartitionedFile;
29+
use datafusion::datafusion_storage::{
30+
object_store::local::LocalFileSystem, FileMeta, PartitionedFile, SizedFile,
31+
};
3232
use datafusion::execution::context::ExecutionProps;
3333

3434
use datafusion::physical_plan::file_format::FileScanConfig;

ballista/rust/core/src/serde/physical_plan/mod.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ use crate::serde::{
3333
use crate::{convert_box_required, convert_required, into_physical_plan, into_required};
3434
use datafusion::arrow::compute::SortOptions;
3535
use datafusion::arrow::datatypes::SchemaRef;
36-
use datafusion::datasource::object_store::local::LocalFileSystem;
37-
use datafusion::datasource::PartitionedFile;
36+
use datafusion::datafusion_storage::object_store::local::LocalFileSystem;
37+
use datafusion::datafusion_storage::PartitionedFile;
3838
use datafusion::logical_plan::window_frames::WindowFrame;
3939
use datafusion::physical_plan::aggregates::create_aggregate_expr;
4040
use datafusion::physical_plan::coalesce_batches::CoalesceBatchesExec;
@@ -941,8 +941,9 @@ mod roundtrip_tests {
941941
use std::sync::Arc;
942942

943943
use crate::serde::{AsExecutionPlan, BallistaCodec};
944-
use datafusion::datasource::object_store::local::LocalFileSystem;
945-
use datafusion::datasource::PartitionedFile;
944+
use datafusion::datafusion_storage::{
945+
object_store::local::LocalFileSystem, PartitionedFile,
946+
};
946947
use datafusion::physical_plan::sorts::sort::SortExec;
947948
use datafusion::prelude::SessionContext;
948949
use datafusion::{

ballista/rust/core/src/serde/physical_plan/to_proto.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use datafusion::physical_plan::{
3535
Statistics,
3636
};
3737

38-
use datafusion::datasource::PartitionedFile;
38+
use datafusion::datafusion_storage::PartitionedFile;
3939
use datafusion::physical_plan::file_format::FileScanConfig;
4040

4141
use datafusion::physical_plan::expressions::{Count, Literal};

ballista/rust/scheduler/src/scheduler_server/grpc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ use ballista_core::serde::scheduler::{
3333
ExecutorData, ExecutorDataChange, ExecutorMetadata,
3434
};
3535
use ballista_core::serde::{AsExecutionPlan, AsLogicalPlan};
36+
use datafusion::datafusion_storage::object_store::{local::LocalFileSystem, ObjectStore};
3637
use datafusion::datasource::file_format::parquet::ParquetFormat;
3738
use datafusion::datasource::file_format::FileFormat;
38-
use datafusion::datasource::object_store::{local::LocalFileSystem, ObjectStore};
3939
use futures::StreamExt;
4040
use log::{debug, error, info, trace, warn};
4141
use rand::{distributions::Alphanumeric, thread_rng, Rng};

benchmarks/src/bin/tpch.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,8 @@ use datafusion::{
5050
};
5151
use datafusion::{
5252
arrow::util::pretty,
53-
datasource::{
54-
listing::{ListingOptions, ListingTable, ListingTableConfig},
55-
object_store::local::LocalFileSystem,
56-
},
53+
datafusion_storage::object_store::local::LocalFileSystem,
54+
datasource::listing::{ListingOptions, ListingTable, ListingTableConfig},
5755
};
5856

5957
use datafusion::datasource::file_format::csv::DEFAULT_CSV_EXTENSION;

datafusion-examples/examples/flight_server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ use std::pin::Pin;
1919
use std::sync::Arc;
2020

2121
use arrow_flight::SchemaAsIpc;
22+
use datafusion::datafusion_storage::object_store::local::LocalFileSystem;
2223
use datafusion::datasource::file_format::parquet::ParquetFormat;
2324
use datafusion::datasource::listing::ListingOptions;
24-
use datafusion::datasource::object_store::local::LocalFileSystem;
2525
use futures::Stream;
2626
use tonic::transport::Server;
2727
use tonic::{Request, Response, Status, Streaming};

datafusion-storage/Cargo.toml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
[package]
19+
name = "datafusion-storage"
20+
description = "Storage for DataFusion query engine"
21+
version = "7.0.0"
22+
homepage = "https://github.com/apache/arrow-datafusion"
23+
repository = "https://github.com/apache/arrow-datafusion"
24+
readme = "README.md"
25+
authors = ["Apache Arrow <dev@arrow.apache.org>"]
26+
license = "Apache-2.0"
27+
keywords = [ "arrow", "query", "sql" ]
28+
edition = "2021"
29+
rust-version = "1.59"
30+
31+
[lib]
32+
name = "datafusion_storage"
33+
path = "src/lib.rs"
34+
35+
[dependencies]
36+
async-trait = "0.1.41"
37+
chrono = { version = "0.4", default-features = false }
38+
datafusion-common = { path = "../datafusion-common", version = "7.0.0" }
39+
futures = "0.3"
40+
parking_lot = "0.12"
41+
tempfile = "3"
42+
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync", "fs", "parking_lot"] }

0 commit comments

Comments
 (0)