This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/master by this push:
new 3b8a20a94 minor: fix some typo. (#3453)
3b8a20a94 is described below
commit 3b8a20a94eb12ec393072694e7e278e32223fcd6
Author: jakevin <[email protected]>
AuthorDate: Tue Sep 13 01:05:37 2022 +0800
minor: fix some typo. (#3453)
* minor: fix some typo.
* minor: fix some typo.
---
datafusion-examples/examples/memtable.rs | 10 ++++------
datafusion/core/src/dataframe.rs | 2 +-
datafusion/core/src/physical_optimizer/aggregate_statistics.rs | 4 ++--
datafusion/core/src/physical_optimizer/repartition.rs | 2 +-
datafusion/core/src/physical_plan/stream.rs | 2 +-
datafusion/core/src/test_util.rs | 2 +-
datafusion/expr/src/expr_visitor.rs | 2 +-
7 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/datafusion-examples/examples/memtable.rs
b/datafusion-examples/examples/memtable.rs
index 11793a837..bef8f3e5b 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 ea90a9b81..9be7138dc 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 1237d4911..4a941ec4b 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 52e36d8d5..20aa59f0c 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 06d670ff4..77be217e4 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 ee53a424c..ad27ea3c1 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 0eea32b51..0f2f5077a 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;