Skip to content

Commit

Permalink
Refactor: Consolidate OutputFileFormat and FileType into datafusion_c…
Browse files Browse the repository at this point in the history
…ommon (#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
  • Loading branch information
devinjdangelo authored Aug 22, 2023
1 parent f3722c0 commit ffccbe6
Show file tree
Hide file tree
Showing 33 changed files with 172 additions and 177 deletions.
1 change: 1 addition & 0 deletions benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ snmalloc = ["snmalloc-rs"]
[dependencies]
arrow = { workspace = true }
datafusion = { path = "../datafusion/core", version = "29.0.0" }
datafusion-common = { path = "../datafusion/common", version = "29.0.0" }
env_logger = "0.10"
futures = "0.3"
log = "^0.4"
Expand Down
7 changes: 3 additions & 4 deletions benchmarks/src/tpch/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@ use super::get_query_sql;
use crate::{BenchmarkRun, CommonOpt};
use arrow::record_batch::RecordBatch;
use arrow::util::pretty::{self, pretty_format_batches};
use datafusion::datasource::file_format::csv::{CsvFormat, DEFAULT_CSV_EXTENSION};
use datafusion::datasource::file_format::parquet::{
ParquetFormat, DEFAULT_PARQUET_EXTENSION,
};
use datafusion::datasource::file_format::csv::CsvFormat;
use datafusion::datasource::file_format::parquet::ParquetFormat;
use datafusion::datasource::file_format::FileFormat;
use datafusion::datasource::listing::{
ListingOptions, ListingTable, ListingTableConfig, ListingTableUrl,
};
use datafusion::datasource::{MemTable, TableProvider};
use datafusion::physical_plan::display::DisplayableExecutionPlan;
use datafusion::physical_plan::{collect, displayable};
use datafusion_common::{DEFAULT_CSV_EXTENSION, DEFAULT_PARQUET_EXTENSION};
use log::info;

use std::path::PathBuf;
Expand Down
111 changes: 60 additions & 51 deletions datafusion-cli/Cargo.lock

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

2 changes: 1 addition & 1 deletion datafusion-examples/examples/csv_opener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use std::{sync::Arc, vec};
use datafusion::{
assert_batches_eq,
datasource::{
file_format::file_type::FileCompressionType,
listing::PartitionedFile,
object_store::ObjectStoreUrl,
physical_plan::{CsvConfig, CsvOpener, FileScanConfig, FileStream},
Expand All @@ -29,6 +28,7 @@ use datafusion::{
physical_plan::metrics::ExecutionPlanMetricsSet,
test_util::aggr_test_schema,
};
use datafusion_common::FileCompressionType;
use futures::StreamExt;
use object_store::local::LocalFileSystem;

Expand Down
2 changes: 1 addition & 1 deletion datafusion-examples/examples/csv_sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
// specific language governing permissions and limitations
// under the License.

use datafusion::datasource::file_format::file_type::FileCompressionType;
use datafusion::error::Result;
use datafusion::prelude::*;
use datafusion_common::FileCompressionType;

/// This example demonstrates executing a simple query against an Arrow data source (CSV) and
/// fetching results
Expand Down
2 changes: 1 addition & 1 deletion datafusion-examples/examples/dataframe-to-s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
// specific language governing permissions and limitations
// under the License.

use datafusion::datasource::file_format::file_type::{FileType, GetExt};
use datafusion::datasource::file_format::parquet::ParquetFormat;
use datafusion::datasource::listing::ListingOptions;
use datafusion::error::Result;
use datafusion::prelude::*;
use datafusion_common::{FileType, GetExt};

use object_store::aws::AmazonS3Builder;
use std::env;
Expand Down
Loading

0 comments on commit ffccbe6

Please sign in to comment.