diff --git a/rust/arrow-flight/src/utils.rs b/rust/arrow-flight/src/utils.rs index fcc58470e21..ee19f34a7c5 100644 --- a/rust/arrow-flight/src/utils.rs +++ b/rust/arrow-flight/src/utils.rs @@ -154,4 +154,4 @@ pub fn flight_data_to_arrow_batch( ) } -// TODO: add more explicit conversion that expoess flight descriptor and metadata options +// TODO: add more explicit conversion that exposes flight descriptor and metadata options diff --git a/rust/arrow/examples/tensor_builder.rs b/rust/arrow/examples/tensor_builder.rs index b26247373e7..19421715ceb 100644 --- a/rust/arrow/examples/tensor_builder.rs +++ b/rust/arrow/examples/tensor_builder.rs @@ -57,7 +57,7 @@ fn main() -> Result<()> { println!("{:?}", tensor); // In order to build a tensor from an array the function to_byte_slice add the - // required padding to the elements in the the array. + // required padding to the elements in the array. let buf = Buffer::from(&[0, 1, 2, 3, 4, 5, 6, 7, 9, 10].to_byte_slice()); let tensor = Int32Tensor::try_new(buf, Some(vec![2, 5]), None, None)?; println!("\nInt32 Tensor"); diff --git a/rust/arrow/src/compute/kernels/cast.rs b/rust/arrow/src/compute/kernels/cast.rs index 0b6e172d30a..4e1bc852d42 100644 --- a/rust/arrow/src/compute/kernels/cast.rs +++ b/rust/arrow/src/compute/kernels/cast.rs @@ -1049,7 +1049,7 @@ where // use the take kernel to expand out the dictionary let cast_dict_values = cast(&dict_array.values(), to_type)?; - // Note take requires first casting the indicies to u32 + // Note take requires first casting the indices to u32 let keys_array: ArrayRef = Arc::new(dict_array.keys_array()); let indicies = cast(&keys_array, &DataType::UInt32)?; let u32_indicies = @@ -1058,7 +1058,7 @@ where .downcast_ref::() .ok_or_else(|| { ArrowError::ComputeError( - "Internal Error: Cannot cast dict indicies to UInt32".to_string(), + "Internal Error: Cannot cast dict indices to UInt32".to_string(), ) })?; diff --git a/rust/arrow/src/lib.rs b/rust/arrow/src/lib.rs index 6e3eea50896..09c04be4b2c 100644 --- a/rust/arrow/src/lib.rs +++ b/rust/arrow/src/lib.rs @@ -52,7 +52,7 @@ //! # let array = UInt32Array::from(vec![Some(1), None, Some(3)]); //! let array: ArrayRef = Arc::new(array); //! assert_eq!(array.len(), 3); -//! // array.value() is not available in the dynamcally-typed version +//! // array.value() is not available in the dynamically-typed version //! assert_eq!(array.is_null(1), true); //! assert_eq!(array.data_type(), &DataType::UInt32); //! ``` diff --git a/rust/arrow/src/tensor.rs b/rust/arrow/src/tensor.rs index c3776368b10..92c5cfee7b1 100644 --- a/rust/arrow/src/tensor.rs +++ b/rust/arrow/src/tensor.rs @@ -147,7 +147,7 @@ impl<'a, T: ArrowPrimitiveType> Tensor<'a, T> { let total_elements: usize = s.iter().product(); if total_elements != (buffer.len() / mem::size_of::()) { return Err(ArrowError::InvalidArgumentError( - "number of elements in buffer does not match dimensios" + "number of elements in buffer does not match dimensions" .to_string(), )); } diff --git a/rust/datafusion/src/execution/context.rs b/rust/datafusion/src/execution/context.rs index f2a356925d0..308623c8668 100644 --- a/rust/datafusion/src/execution/context.rs +++ b/rust/datafusion/src/execution/context.rs @@ -381,7 +381,7 @@ impl From for ExecutionContext { } } -/// A planner used to add extensions to DataFusion logical and phusical plans. +/// A planner used to add extensions to DataFusion logical and physical plans. pub trait QueryPlanner { /// Given a `LogicalPlan`, create a new, modified `LogicalPlan` /// plan. This method is run after built in `OptimizerRule`s. By diff --git a/rust/datafusion/src/logical_plan/mod.rs b/rust/datafusion/src/logical_plan/mod.rs index e1bf5fdb1e0..b3004f23da2 100644 --- a/rust/datafusion/src/logical_plan/mod.rs +++ b/rust/datafusion/src/logical_plan/mod.rs @@ -710,12 +710,12 @@ impl fmt::Debug for Expr { /// /// See the example in /// [user_defined_plan.rs](../../tests/user_defined_plan.rs) for an -/// example of how to use this extenison API +/// example of how to use this extension API pub trait UserDefinedLogicalNode: Debug { /// Return a reference to self as Any, to support dynamic downcasting fn as_any(&self) -> &dyn Any; - /// Return the the logical plan's inputs + /// Return the logical plan's inputs fn inputs(&self) -> Vec<&LogicalPlan>; /// Return the output schema of this logical plan node diff --git a/rust/datafusion/src/physical_plan/datetime_expressions.rs b/rust/datafusion/src/physical_plan/datetime_expressions.rs index 9eba91fdff5..02d950ac7be 100644 --- a/rust/datafusion/src/physical_plan/datetime_expressions.rs +++ b/rust/datafusion/src/physical_plan/datetime_expressions.rs @@ -34,7 +34,7 @@ use chrono::{prelude::*, LocalResult}; /// Implements the `to_timestamp` function to convert a string to a /// timestamp, following the model of spark SQL’s to_`timestamp`. /// -/// In addition to RFC3339 / ISO8601 standard tiemstamps, it also +/// In addition to RFC3339 / ISO8601 standard timestamps, it also /// accepts strings that use a space ` ` to separate the date and time /// as well as strings that have no explicit timezone offset. /// @@ -96,7 +96,7 @@ fn string_to_timestamp_nanos(s: &str) -> Result { return Ok(ts.timestamp_nanos()); } - // with an explict Z, using ' ' as a separator + // with an explicit Z, using ' ' as a separator // Example: 2020-09-08 13:42:29Z if let Ok(ts) = Utc.datetime_from_str(s, "%Y-%m-%d %H:%M:%S%.fZ") { return Ok(ts.timestamp_nanos()); diff --git a/rust/datafusion/src/physical_plan/type_coercion.rs b/rust/datafusion/src/physical_plan/type_coercion.rs index 52226c98a85..728dd81538e 100644 --- a/rust/datafusion/src/physical_plan/type_coercion.rs +++ b/rust/datafusion/src/physical_plan/type_coercion.rs @@ -19,7 +19,7 @@ //! //! Coercion is performed automatically by DataFusion when the types //! of arguments passed to a function do not exacty match the types -//! required by that function. In this case, DataFuson will attempt to +//! required by that function. In this case, DataFusion will attempt to //! *coerce* the arguments to types accepted by the function by //! inserting CAST operations. //! diff --git a/rust/datafusion/src/sql/parser.rs b/rust/datafusion/src/sql/parser.rs index 08c7b8c15f2..032444549ca 100644 --- a/rust/datafusion/src/sql/parser.rs +++ b/rust/datafusion/src/sql/parser.rs @@ -64,7 +64,7 @@ pub struct CreateExternalTable { pub struct ExplainPlan { /// If true, dumps more intermediate plans and results of optimizaton passes pub verbose: bool, - /// The statement for which to generate an planning explination + /// The statement for which to generate an planning explanation pub statement: Box, } diff --git a/rust/datafusion/src/variable/mod.rs b/rust/datafusion/src/variable/mod.rs index ebcee189695..db9ff7f0a60 100644 --- a/rust/datafusion/src/variable/mod.rs +++ b/rust/datafusion/src/variable/mod.rs @@ -20,7 +20,7 @@ use crate::error::Result; use crate::scalar::ScalarValue; -/// Variable type, system/user defiend +/// Variable type, system/user defined #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum VarType { /// System variable, like @@version diff --git a/rust/datafusion/tests/sql.rs b/rust/datafusion/tests/sql.rs index 5bf45251716..9eceb768a3f 100644 --- a/rust/datafusion/tests/sql.rs +++ b/rust/datafusion/tests/sql.rs @@ -268,7 +268,7 @@ async fn csv_query_custom_udf_with_cast() -> Result<()> { Ok(()) } -/// sqrt(f32) is sligthly different than sqrt(CAST(f32 AS double))) +/// sqrt(f32) is slightly different than sqrt(CAST(f32 AS double))) #[tokio::test] async fn sqrt_f32_vs_f64() -> Result<()> { let mut ctx = create_ctx()?; diff --git a/rust/datafusion/tests/user_defined_plan.rs b/rust/datafusion/tests/user_defined_plan.rs index 7db7eec516c..ad8e618ad5d 100644 --- a/rust/datafusion/tests/user_defined_plan.rs +++ b/rust/datafusion/tests/user_defined_plan.rs @@ -306,8 +306,8 @@ impl UserDefinedLogicalNode for TopKPlanNode { exprs: &Vec, inputs: &Vec, ) -> Arc { - assert_eq!(inputs.len(), 1, "input size inconistent"); - assert_eq!(exprs.len(), 1, "expression size inconistent"); + assert_eq!(inputs.len(), 1, "input size inconsistent"); + assert_eq!(exprs.len(), 1, "expression size inconsistent"); Arc::new(TopKPlanNode { k: self.k, input: inputs[0].clone(),