Skip to content

Apache DataFusion SQL Query Engine

minor: remove redundant code/TODO (#4019)

jakevin8f1ae58494b7
diff --git a/datafusion/core/src/dataframe.rs b/datafusion/core/src/dataframe.rs
index a699a234cd..aa5958fe62 100644
--- a/datafusion/core/src/dataframe.rs
+++ b/datafusion/core/src/dataframe.rs
@@ -362,8 +362,6 @@ impl DataFrame {
Ok(Arc::new(DataFrame::new(self.session_state.clone(), &plan)))
}
- // TODO: add join_using
-
/// Repartition a DataFrame based on a logical partitioning scheme.
///
/// ```
@@ -1386,9 +1384,7 @@ mod tests {
let plan = df.explain(false, false)?.collect().await?;
// Filters all the way to Parquet
- let formatted = arrow::util::pretty::pretty_format_batches(&plan)
- .unwrap()
- .to_string();
+ let formatted = pretty::pretty_format_batches(&plan).unwrap().to_string();
assert!(formatted.contains("predicate=id_min@0 <= 1 AND 1 <= id_max@1"));
Ok(())
diff --git a/datafusion/core/src/physical_plan/joins/hash_join.rs b/datafusion/core/src/physical_plan/joins/hash_join.rs
index 99628d7dac..839a24112a 100644
--- a/datafusion/core/src/physical_plan/joins/hash_join.rs
+++ b/datafusion/core/src/physical_plan/joins/hash_join.rs
@@ -348,11 +348,7 @@ impl ExecutionPlan for HashJoinExec {
}))
}
- fn fmt_as(
- &self,
- t: DisplayFormatType,
- f: &mut std::fmt::Formatter,
- ) -> std::fmt::Result {
+ fn fmt_as(&self, t: DisplayFormatType, f: &mut fmt::Formatter) -> fmt::Result {
match t {
DisplayFormatType::Default => {
let display_filter = self.filter.as_ref().map_or_else(
@@ -1361,7 +1357,7 @@ fn produce_from_matched(
}
JoinSide::Right => {
let datatype = schema.field(idx).data_type();
- arrow::array::new_null_array(datatype, num_rows)
+ new_null_array(datatype, num_rows)
}
};
@@ -1376,7 +1372,7 @@ impl HashJoinStream {
fn poll_next_impl(
&mut self,
cx: &mut std::task::Context<'_>,
- ) -> std::task::Poll<Option<ArrowResult<RecordBatch>>> {
+ ) -> Poll<Option<ArrowResult<RecordBatch>>> {
let left_data = match ready!(self.left_fut.get(cx)) {
Ok(left_data) => left_data,
Err(e) => return Poll::Ready(Some(Err(e))),
diff --git a/datafusion/core/src/test/exec.rs b/datafusion/core/src/test/exec.rs
index 855bb3bbc1..e7ee746c98 100644
--- a/datafusion/core/src/test/exec.rs
+++ b/datafusion/core/src/test/exec.rs
@@ -46,7 +46,7 @@ use crate::{
/// Index into the data that has been returned so far
#[derive(Debug, Default, Clone)]
pub struct BatchIndex {
- inner: std::sync::Arc<std::sync::Mutex<usize>>,
+ inner: Arc<std::sync::Mutex<usize>>,
}
impl BatchIndex {
@@ -91,10 +91,7 @@ impl TestStream {
impl Stream for TestStream {
type Item = ArrowResult<RecordBatch>;
- fn poll_next(
- self: std::pin::Pin<&mut Self>,
- _: &mut Context<'_>,
- ) -> Poll<Option<Self::Item>> {
+ fn poll_next(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Option<Self::Item>> {
let next_batch = self.index.value();
Poll::Ready(if next_batch < self.data.len() {