Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yjshen committed Jan 13, 2022
1 parent 3d6c865 commit 04dca98
Show file tree
Hide file tree
Showing 23 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion ballista/rust/core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl From<tokio::task::JoinError> for BallistaError {
}

impl Display for BallistaError {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut Formatter) -> std::fmt::Result {
match self {
BallistaError::NotImplemented(ref desc) => {
write!(f, "Not implemented: {}", desc)
Expand Down
2 changes: 1 addition & 1 deletion datafusion-cli/src/print_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl FromStr for PrintFormat {
}

impl fmt::Display for PrintFormat {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
Self::Csv => write!(f, "csv"),
Self::Tsv => write!(f, "tsv"),
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/datasource/object_store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ pub struct ObjectStoreRegistry {
}

impl fmt::Debug for ObjectStoreRegistry {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("ObjectStoreRegistry")
.field(
"schemes",
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl From<ParserError> for DataFusionError {
}

impl Display for DataFusionError {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut Formatter) -> std::fmt::Result {
match *self {
DataFusionError::ArrowError(ref desc) => write!(f, "Arrow error: {}", desc),
DataFusionError::ParquetError(ref desc) => {
Expand Down
8 changes: 4 additions & 4 deletions datafusion/src/execution/memory_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl MemoryConsumerId {
}

impl Display for MemoryConsumerId {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
write!(f, "{}:{}", self.partition_id, self.id)
}
}
Expand Down Expand Up @@ -123,7 +123,7 @@ pub trait MemoryConsumer: Send + Sync {
}

impl Debug for dyn MemoryConsumer {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
write!(
f,
"{}[{}]: {}",
Expand All @@ -135,7 +135,7 @@ impl Debug for dyn MemoryConsumer {
}

impl Display for dyn MemoryConsumer {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
write!(f, "{}[{}]", self.name(), self.id(),)
}
}
Expand Down Expand Up @@ -280,7 +280,7 @@ impl MemoryManager {
}

impl Display for MemoryManager {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
let requesters =
self.requesters
.lock()
Expand Down
4 changes: 2 additions & 2 deletions datafusion/src/execution/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

pub mod context;
pub mod dataframe_impl;
pub mod disk_manager;
pub mod memory_manager;
pub(crate) mod disk_manager;
pub(crate) mod memory_manager;
pub mod options;
pub mod runtime_env;
2 changes: 1 addition & 1 deletion datafusion/src/execution/runtime_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub struct RuntimeEnv {
}

impl Debug for RuntimeEnv {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut Formatter) -> std::fmt::Result {
write!(f, "RuntimeEnv")
}
}
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/logical_plan/dfschema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ impl ToDFSchema for Vec<DFField> {
}

impl Display for DFSchema {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut Formatter) -> std::fmt::Result {
write!(
f,
"{}",
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/logical_plan/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ impl FromStr for Column {
}

impl fmt::Display for Column {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match &self.relation {
Some(r) => write!(f, "#{}.{}", r, self.name),
None => write!(f, "#{}", self.name),
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/logical_plan/plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ pub enum PlanType {
}

impl fmt::Display for PlanType {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
PlanType::InitialLogicalPlan => write!(f, "initial_logical_plan"),
PlanType::OptimizedLogicalPlan { optimizer_name } => {
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/physical_plan/expressions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pub struct PhysicalSortExpr {
}

impl std::fmt::Display for PhysicalSortExpr {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
let opts_string = match (self.options.descending, self.options.nulls_first) {
(true, true) => "DESC",
(true, false) => "DESC NULLS LAST",
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/physical_plan/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ pub struct ScalarFunctionExpr {
}

impl Debug for ScalarFunctionExpr {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
f.debug_struct("ScalarFunctionExpr")
.field("fun", &"<FUNC>")
.field("name", &self.name)
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/physical_plan/hash_aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ struct Accumulators {
}

impl std::fmt::Debug for Accumulators {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
// hashes are not store inline, so could only get values
let map_string = "RawTable";
f.debug_struct("Accumulators")
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/physical_plan/hash_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ use std::fmt;
struct JoinHashMap(RawTable<(u64, SmallVec<[u64; 1]>)>);

impl fmt::Debug for JoinHashMap {
fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
fn fmt(&self, _f: &mut fmt::Formatter) -> fmt::Result {
Ok(())
}
}
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/physical_plan/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub struct MemoryExec {
}

impl fmt::Debug for MemoryExec {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "partitions: [...]")?;
write!(f, "schema: {:?}", self.projected_schema)?;
write!(f, "projection: {:?}", self.projection)
Expand Down
6 changes: 3 additions & 3 deletions datafusion/src/physical_plan/metrics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub struct Metric {
}

impl Display for Metric {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "{}", self.value.name())?;

let mut iter = self
Expand Down Expand Up @@ -282,7 +282,7 @@ impl MetricsSet {

impl Display for MetricsSet {
/// format the MetricsSet as a single string
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
let mut is_first = true;
for i in self.metrics.iter() {
if !is_first {
Expand Down Expand Up @@ -363,7 +363,7 @@ impl Label {
}

impl Display for Label {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "{}={}", self.name, self.value)
}
}
Expand Down
8 changes: 4 additions & 4 deletions datafusion/src/physical_plan/metrics/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl PartialEq for Count {
}

impl Display for Count {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "{}", self.value())
}
}
Expand Down Expand Up @@ -97,7 +97,7 @@ impl PartialEq for Time {
}

impl Display for Time {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
let duration = std::time::Duration::from_nanos(self.value() as u64);
write!(f, "{:?}", duration)
}
Expand Down Expand Up @@ -216,7 +216,7 @@ impl PartialEq for Timestamp {
}

impl Display for Timestamp {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self.value() {
None => write!(f, "NONE"),
Some(v) => {
Expand Down Expand Up @@ -416,7 +416,7 @@ impl MetricValue {

impl std::fmt::Display for MetricValue {
/// Prints the value of this metric
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::OutputRows(count) | Self::Count { count, .. } => {
write!(f, "{}", count)
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/physical_plan/sorts/external_sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ impl ExternalSorter {
}

impl Debug for ExternalSorter {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
f.debug_struct("ExternalSorter")
.field("id", &self.id())
.field("memory_used", &self.used())
Expand Down
4 changes: 2 additions & 2 deletions datafusion/src/physical_plan/sorts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ struct SortKeyCursor {
}

impl<'a> std::fmt::Debug for SortKeyCursor {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
f.debug_struct("SortKeyCursor")
.field("columns", &self.columns)
.field("cur_row", &self.cur_row)
Expand Down Expand Up @@ -232,7 +232,7 @@ pub(crate) struct SortedStream {
}

impl Debug for SortedStream {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut Formatter) -> std::fmt::Result {
write!(f, "InMemSorterStream")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ struct MergingStreams {
}

impl Debug for MergingStreams {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
fn fmt(&self, f: &mut Formatter) -> std::fmt::Result {
f.debug_struct("MergingStreams")
.field("id", &self.id())
.finish()
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/physical_plan/udaf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub struct AggregateUDF {
}

impl Debug for AggregateUDF {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
f.debug_struct("AggregateUDF")
.field("name", &self.name)
.field("signature", &self.signature)
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/physical_plan/udf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub struct ScalarUDF {
}

impl Debug for ScalarUDF {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
f.debug_struct("ScalarUDF")
.field("name", &self.name)
.field("signature", &self.signature)
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2108,7 +2108,7 @@ impl fmt::Display for ScalarValue {
}

impl fmt::Debug for ScalarValue {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
ScalarValue::Decimal128(_, _, _) => write!(f, "Decimal128({})", self),
ScalarValue::Boolean(_) => write!(f, "Boolean({})", self),
Expand Down

0 comments on commit 04dca98

Please sign in to comment.