Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust/arrow-flight/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion rust/arrow/examples/tensor_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions rust/arrow/src/compute/kernels/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -1058,7 +1058,7 @@ where
.downcast_ref::<UInt32Array>()
.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(),
)
})?;

Expand Down
2 changes: 1 addition & 1 deletion rust/arrow/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
//! ```
Expand Down
2 changes: 1 addition & 1 deletion rust/arrow/src/tensor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<T::Native>()) {
return Err(ArrowError::InvalidArgumentError(
"number of elements in buffer does not match dimensios"
"number of elements in buffer does not match dimensions"
.to_string(),
));
}
Expand Down
2 changes: 1 addition & 1 deletion rust/datafusion/src/execution/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ impl From<ExecutionContextState> 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
Expand Down
4 changes: 2 additions & 2 deletions rust/datafusion/src/logical_plan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions rust/datafusion/src/physical_plan/datetime_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down Expand Up @@ -96,7 +96,7 @@ fn string_to_timestamp_nanos(s: &str) -> Result<i64> {
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());
Expand Down
2 changes: 1 addition & 1 deletion rust/datafusion/src/physical_plan/type_coercion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//!
Expand Down
2 changes: 1 addition & 1 deletion rust/datafusion/src/sql/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Statement>,
}

Expand Down
2 changes: 1 addition & 1 deletion rust/datafusion/src/variable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion rust/datafusion/tests/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()?;
Expand Down
4 changes: 2 additions & 2 deletions rust/datafusion/tests/user_defined_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ impl UserDefinedLogicalNode for TopKPlanNode {
exprs: &Vec<Expr>,
inputs: &Vec<LogicalPlan>,
) -> Arc<dyn UserDefinedLogicalNode + Send + Sync> {
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(),
Expand Down