Skip to content

Commit 11a5a63

Browse files
committed
Merge remote-tracking branch 'apache/main' into alamb/move_partition_evaluator
2 parents 2744df8 + f0e02ab commit 11a5a63

File tree

95 files changed

+2570
-1954
lines changed

Some content is hidden

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

95 files changed

+2570
-1954
lines changed

benchmarks/src/bin/tpch.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,14 +303,14 @@ async fn execute_query(
303303
if debug {
304304
println!(
305305
"=== Physical plan ===\n{}\n",
306-
displayable(physical_plan.as_ref()).indent()
306+
displayable(physical_plan.as_ref()).indent(true)
307307
);
308308
}
309309
let result = collect(physical_plan.clone(), state.task_ctx()).await?;
310310
if debug {
311311
println!(
312312
"=== Physical plan with metrics ===\n{}\n",
313-
DisplayableExecutionPlan::with_metrics(physical_plan.as_ref()).indent()
313+
DisplayableExecutionPlan::with_metrics(physical_plan.as_ref()).indent(true)
314314
);
315315
if !result.is_empty() {
316316
// do not call print_batches if there are no batches as the result is confusing

datafusion-cli/Cargo.lock

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

datafusion/optimizer/src/alias.rs renamed to datafusion/common/src/alias.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use std::sync::atomic::{AtomicUsize, Ordering};
1919

2020
/// A utility struct that can be used to generate unique aliases when optimizing queries
21+
#[derive(Debug)]
2122
pub struct AliasGenerator {
2223
next_id: AtomicUsize,
2324
}

datafusion/common/src/lib.rs

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

18+
pub mod alias;
1819
pub mod cast;
1920
mod column;
2021
pub mod config;

datafusion/core/src/datasource/file_format/csv.rs

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
use std::any::Any;
2121
use std::collections::HashSet;
2222
use std::fmt;
23-
use std::fmt::{Debug, Display};
23+
use std::fmt::Debug;
2424
use std::sync::Arc;
2525

2626
use arrow::csv::WriterBuilder;
@@ -51,7 +51,7 @@ use crate::datasource::physical_plan::{
5151
use crate::error::Result;
5252
use crate::execution::context::SessionState;
5353
use crate::physical_plan::insert::{DataSink, InsertExec};
54-
use crate::physical_plan::Statistics;
54+
use crate::physical_plan::{DisplayAs, DisplayFormatType, Statistics};
5555
use crate::physical_plan::{ExecutionPlan, SendableRecordBatchStream};
5656

5757
/// The default file extension of csv files
@@ -443,14 +443,19 @@ impl Debug for CsvSink {
443443
}
444444
}
445445

446-
impl Display for CsvSink {
447-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
448-
write!(
449-
f,
450-
"CsvSink(writer_mode={:?}, file_groups={})",
451-
self.config.writer_mode,
452-
FileGroupDisplay(&self.config.file_groups),
453-
)
446+
impl DisplayAs for CsvSink {
447+
fn fmt_as(&self, t: DisplayFormatType, f: &mut fmt::Formatter<'_>) -> fmt::Result {
448+
match t {
449+
DisplayFormatType::Default | DisplayFormatType::Verbose => {
450+
write!(
451+
f,
452+
"CsvSink(writer_mode={:?}, file_groups=",
453+
self.config.writer_mode
454+
)?;
455+
FileGroupDisplay(&self.config.file_groups).fmt_as(t, f)?;
456+
write!(f, ")")
457+
}
458+
}
454459
}
455460
}
456461

datafusion/core/src/datasource/listing/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ pub struct FileRange {
5050

5151
#[derive(Debug, Clone)]
5252
/// A single file or part of a file that should be read, along with its schema, statistics
53-
/// A single file that should be read, along with its schema, statistics
5453
/// and partition column values that need to be appended to each row.
5554
pub struct PartitionedFile {
5655
/// Path for the file (e.g. URL, filesystem path, etc)

datafusion/core/src/datasource/listing/url.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use url::Url;
2828

2929
/// A parsed URL identifying files for a listing table, see [`ListingTableUrl::parse`]
3030
/// for more information on the supported expressions
31-
#[derive(Debug, Clone)]
31+
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
3232
pub struct ListingTableUrl {
3333
/// A URL that identifies a file or directory to list files from
3434
url: Url,

0 commit comments

Comments
 (0)