Skip to content

Commit ffccbe6

Browse files
Refactor: Consolidate OutputFileFormat and FileType into datafusion_common (#7336)
* refactor * remove local test files * cargo fmt * update Cargo.lock * format cargo.toml * merge main and resolve conflicts * use _internal_err! macro again * clean up macro calls * missed a macro call * fix internal to not impl error * switched the wrong one
1 parent f3722c0 commit ffccbe6

File tree

33 files changed

+172
-177
lines changed

33 files changed

+172
-177
lines changed

benchmarks/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ snmalloc = ["snmalloc-rs"]
3535
[dependencies]
3636
arrow = { workspace = true }
3737
datafusion = { path = "../datafusion/core", version = "29.0.0" }
38+
datafusion-common = { path = "../datafusion/common", version = "29.0.0" }
3839
env_logger = "0.10"
3940
futures = "0.3"
4041
log = "^0.4"

benchmarks/src/tpch/run.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@ use super::get_query_sql;
1919
use crate::{BenchmarkRun, CommonOpt};
2020
use arrow::record_batch::RecordBatch;
2121
use arrow::util::pretty::{self, pretty_format_batches};
22-
use datafusion::datasource::file_format::csv::{CsvFormat, DEFAULT_CSV_EXTENSION};
23-
use datafusion::datasource::file_format::parquet::{
24-
ParquetFormat, DEFAULT_PARQUET_EXTENSION,
25-
};
22+
use datafusion::datasource::file_format::csv::CsvFormat;
23+
use datafusion::datasource::file_format::parquet::ParquetFormat;
2624
use datafusion::datasource::file_format::FileFormat;
2725
use datafusion::datasource::listing::{
2826
ListingOptions, ListingTable, ListingTableConfig, ListingTableUrl,
2927
};
3028
use datafusion::datasource::{MemTable, TableProvider};
3129
use datafusion::physical_plan::display::DisplayableExecutionPlan;
3230
use datafusion::physical_plan::{collect, displayable};
31+
use datafusion_common::{DEFAULT_CSV_EXTENSION, DEFAULT_PARQUET_EXTENSION};
3332
use log::info;
3433

3534
use std::path::PathBuf;

datafusion-cli/Cargo.lock

Lines changed: 60 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datafusion-examples/examples/csv_opener.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ use std::{sync::Arc, vec};
2020
use datafusion::{
2121
assert_batches_eq,
2222
datasource::{
23-
file_format::file_type::FileCompressionType,
2423
listing::PartitionedFile,
2524
object_store::ObjectStoreUrl,
2625
physical_plan::{CsvConfig, CsvOpener, FileScanConfig, FileStream},
@@ -29,6 +28,7 @@ use datafusion::{
2928
physical_plan::metrics::ExecutionPlanMetricsSet,
3029
test_util::aggr_test_schema,
3130
};
31+
use datafusion_common::FileCompressionType;
3232
use futures::StreamExt;
3333
use object_store::local::LocalFileSystem;
3434

datafusion-examples/examples/csv_sql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
use datafusion::datasource::file_format::file_type::FileCompressionType;
1918
use datafusion::error::Result;
2019
use datafusion::prelude::*;
20+
use datafusion_common::FileCompressionType;
2121

2222
/// This example demonstrates executing a simple query against an Arrow data source (CSV) and
2323
/// fetching results

datafusion-examples/examples/dataframe-to-s3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
use datafusion::datasource::file_format::file_type::{FileType, GetExt};
1918
use datafusion::datasource::file_format::parquet::ParquetFormat;
2019
use datafusion::datasource::listing::ListingOptions;
2120
use datafusion::error::Result;
2221
use datafusion::prelude::*;
22+
use datafusion_common::{FileType, GetExt};
2323

2424
use object_store::aws::AmazonS3Builder;
2525
use std::env;

0 commit comments

Comments
 (0)