Skip to content

Apache DataFusion SQL Query Engine

minor: fix some typo. (#3453)

jakevin3b8a20a94eb1
diff --git a/datafusion-examples/examples/memtable.rs b/datafusion-examples/examples/memtable.rs
index 11793a837f..bef8f3e5bb 100644
--- a/datafusion-examples/examples/memtable.rs
+++ b/datafusion-examples/examples/memtable.rs
@@ -59,13 +59,11 @@ fn create_record_batch() -> Result<RecordBatch> {
let id_array = UInt8Array::from(vec![1]);
let account_array = UInt64Array::from(vec![9000]);
- Result::Ok(
- RecordBatch::try_new(
- get_schema(),
- vec![Arc::new(id_array), Arc::new(account_array)],
- )
- .unwrap(),
+ Ok(RecordBatch::try_new(
+ get_schema(),
+ vec![Arc::new(id_array), Arc::new(account_array)],
)
+ .unwrap())
}
fn get_schema() -> SchemaRef {
diff --git a/datafusion/core/src/dataframe.rs b/datafusion/core/src/dataframe.rs
index ea90a9b81b..9be7138dca 100644
--- a/datafusion/core/src/dataframe.rs
+++ b/datafusion/core/src/dataframe.rs
@@ -1109,7 +1109,7 @@ mod tests {
table_name: &str,
) -> Result<()> {
let schema = test_util::aggr_test_schema();
- let testdata = crate::test_util::arrow_test_data();
+ let testdata = test_util::arrow_test_data();
ctx.register_csv(
table_name,
&format!("{}/csv/aggregate_test_100.csv", testdata),
diff --git a/datafusion/core/src/physical_optimizer/aggregate_statistics.rs b/datafusion/core/src/physical_optimizer/aggregate_statistics.rs
index 1237d49112..4a941ec4bd 100644
--- a/datafusion/core/src/physical_optimizer/aggregate_statistics.rs
+++ b/datafusion/core/src/physical_optimizer/aggregate_statistics.rs
@@ -101,11 +101,11 @@ impl PhysicalOptimizerRule for AggregateStatistics {
}
/// assert if the node passed as argument is a final `AggregateExec` node that can be optimized:
-/// - its child (with posssible intermediate layers) is a partial `AggregateExec` node
+/// - its child (with possible intermediate layers) is a partial `AggregateExec` node
/// - they both have no grouping expression
/// - the statistics are exact
/// If this is the case, return a ref to the partial `AggregateExec`, else `None`.
-/// We would have prefered to return a casted ref to AggregateExec but the recursion requires
+/// We would have preferred to return a casted ref to AggregateExec but the recursion requires
/// the `ExecutionPlan.children()` method that returns an owned reference.
fn take_optimizable(node: &dyn ExecutionPlan) -> Option<Arc<dyn ExecutionPlan>> {
if let Some(final_agg_exec) = node.as_any().downcast_ref::<AggregateExec>() {
diff --git a/datafusion/core/src/physical_optimizer/repartition.rs b/datafusion/core/src/physical_optimizer/repartition.rs
index 52e36d8d5b..20aa59f0cd 100644
--- a/datafusion/core/src/physical_optimizer/repartition.rs
+++ b/datafusion/core/src/physical_optimizer/repartition.rs
@@ -62,7 +62,7 @@ use crate::{error::Result, execution::context::SessionConfig};
/// ```
///
/// This optimizer will attempt to add a `RepartitionExec` to increase
-/// the parallism (to 3 in this case)
+/// the parallelism (to 3 in this case)
///
/// ```text
/// ┌─────────────────────────────────┐
diff --git a/datafusion/core/src/physical_plan/stream.rs b/datafusion/core/src/physical_plan/stream.rs
index 06d670ff45..77be217e4c 100644
--- a/datafusion/core/src/physical_plan/stream.rs
+++ b/datafusion/core/src/physical_plan/stream.rs
@@ -42,7 +42,7 @@ pub struct RecordBatchReceiverStream {
impl RecordBatchReceiverStream {
/// Construct a new [`RecordBatchReceiverStream`] which will send
- /// batches of the specfied schema from `inner`
+ /// batches of the specified schema from `inner`
pub fn create(
schema: &SchemaRef,
rx: tokio::sync::mpsc::Receiver<ArrowResult<RecordBatch>>,
diff --git a/datafusion/core/src/test_util.rs b/datafusion/core/src/test_util.rs
index ee53a424c8..ad27ea3c1a 100644
--- a/datafusion/core/src/test_util.rs
+++ b/datafusion/core/src/test_util.rs
@@ -167,7 +167,7 @@ pub fn arrow_test_data() -> String {
/// Returns the parquet test data directory, which is by default
/// stored in a git submodule rooted at
-/// `parquest-testing/data`.
+/// `parquet-testing/data`.
///
/// The default can be overridden by the optional environment variable
/// `PARQUET_TEST_DATA`
diff --git a/datafusion/expr/src/expr_visitor.rs b/datafusion/expr/src/expr_visitor.rs
index 0eea32b515..0f2f5077a9 100644
--- a/datafusion/expr/src/expr_visitor.rs
+++ b/datafusion/expr/src/expr_visitor.rs
@@ -34,7 +34,7 @@ pub enum Recursion<V: ExpressionVisitor> {
/// recursively on all nodes of an expression tree. See the comments
/// on `Expr::accept` for details on its use
pub trait ExpressionVisitor<E: ExprVisitable = Expr>: Sized {
- /// Invoked before any children of `expr` are visisted.
+ /// Invoked before any children of `expr` are visited.
fn pre_visit(self, expr: &E) -> Result<Recursion<Self>>
where
Self: ExpressionVisitor;