Skip to content

Commit

Permalink
fix: other typo error fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuliquan committed Dec 22, 2024
1 parent 7828c78 commit 84d704a
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion datafusion/common/src/dfschema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ pub trait ExprSchema: std::fmt::Debug {
/// Returns the column's optional metadata.
fn metadata(&self, col: &Column) -> Result<&HashMap<String, String>>;

/// Return the coulmn's datatype and nullability
/// Return the column's datatype and nullability
fn data_type_and_nullable(&self, col: &Column) -> Result<(&DataType, bool)>;
}

Expand Down
4 changes: 2 additions & 2 deletions datafusion/common/src/scalar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6150,9 +6150,9 @@ mod tests {
&DataType::Timestamp(TimeUnit::Nanosecond, Some("UTC".into()))
);

let newscalar = ScalarValue::try_from_array(&array, 0).unwrap();
let new_scalar = ScalarValue::try_from_array(&array, 0).unwrap();
assert_eq!(
newscalar.data_type(),
new_scalar.data_type(),
DataType::Timestamp(TimeUnit::Nanosecond, Some("UTC".into()))
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ fn would_column_prevent_pushdown(
checker.prevents_pushdown()
}

/// Recurses through expr as a trea, finds all `column`s, and checks if any of them would prevent
/// Recurses through expr as a tree, finds all `column`s, and checks if any of them would prevent
/// this expression from being predicate pushed down. If any of them would, this returns false.
/// Otherwise, true.
pub fn can_expr_be_pushed_down_with_schemas(
Expand Down
2 changes: 1 addition & 1 deletion datafusion/core/tests/dataframe/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ async fn unnest_fixed_list_drop_nulls() -> Result<()> {
}

#[tokio::test]
async fn unnest_fixed_list_nonull() -> Result<()> {
async fn unnest_fixed_list_non_null() -> Result<()> {
let mut shape_id_builder = UInt32Builder::new();
let mut tags_builder = FixedSizeListBuilder::new(StringBuilder::new(), 2);

Expand Down
2 changes: 1 addition & 1 deletion datafusion/functions/src/core/nullif.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ mod tests {

#[test]
// Ensure that arrays with no nulls can also invoke NULLIF() correctly
fn nullif_int32_nonulls() -> Result<()> {
fn nullif_int32_non_nulls() -> Result<()> {
let a = Int32Array::from(vec![1, 3, 10, 7, 8, 1, 2, 4, 5]);
let a = ColumnarValue::Array(Arc::new(a));

Expand Down
2 changes: 1 addition & 1 deletion datafusion/functions/src/core/nvl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ mod tests {

#[test]
// Ensure that arrays with no nulls can also invoke nvl() correctly
fn nvl_int32_nonulls() -> Result<()> {
fn nvl_int32_non_nulls() -> Result<()> {
let a = Int32Array::from(vec![1, 3, 10, 7, 8, 1, 2, 4, 5]);
let a = ColumnarValue::Array(Arc::new(a));

Expand Down
2 changes: 1 addition & 1 deletion datafusion/physical-expr/src/equivalence/properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ fn construct_prefix_orderings(
/// current projection expression.
///
/// # Example
/// If `dependences` is `a + b ASC` and the dependency map holds dependencies
/// If `dependencies` is `a + b ASC` and the dependency map holds dependencies
/// * `a ASC` --> `[c ASC]`
/// * `b ASC` --> `[d DESC]`,
///
Expand Down
4 changes: 2 additions & 2 deletions datafusion/physical-optimizer/src/aggregate_statistics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ mod tests {
let field = &fields[0];
assert_eq!(field.name(), agg.column_name());
assert_eq!(field.data_type(), &DataType::Int64);
// note that nullabiolity differs
// note that nullability differs

assert_eq!(
as_int64_array(batch.column(0)).unwrap().values(),
Expand Down Expand Up @@ -378,7 +378,7 @@ mod tests {
Arc::clone(&schema),
)?;

// We introduce an intermediate optimization step between the partial and final aggregtator
// We introduce an intermediate optimization step between the partial and final aggregator
let coalesce = CoalescePartitionsExec::new(Arc::new(partial_agg));

let final_agg = AggregateExec::try_new(
Expand Down
4 changes: 2 additions & 2 deletions datafusion/sql/src/unparser/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ impl Unparser<'_> {
}

/// Given an expression of the form `((a + b) * (c * d))`,
/// the parenthesing is redundant if the precedence of the nested expression is already higher
/// the parenthesis is redundant if the precedence of the nested expression is already higher
/// than the surrounding operators' precedence. The above expression would become
/// `(a + b) * c * d`.
///
Expand Down Expand Up @@ -1246,7 +1246,7 @@ impl Unparser<'_> {
/// MySQL requires INTERVAL sql to be in the format: INTERVAL 1 YEAR + INTERVAL 1 MONTH + INTERVAL 1 DAY etc
/// `<https://dev.mysql.com/doc/refman/8.4/en/expressions.html#temporal-intervals>`
/// Interval sequence can't be wrapped in brackets - (INTERVAL 1 YEAR + INTERVAL 1 MONTH ...) so we need to generate
/// a single INTERVAL expression so it works correct for interval substraction cases
/// a single INTERVAL expression so it works correct for interval subtraction cases
/// MySQL supports the DAY_MICROSECOND unit type (format is DAYS HOURS:MINUTES:SECONDS.MICROSECONDS), but it is not supported by sqlparser
/// so we calculate the best single interval to represent the provided duration
fn interval_to_mysql_expr(
Expand Down
2 changes: 1 addition & 1 deletion datafusion/substrait/tests/cases/roundtrip_logical_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ fn check_post_join_filters(rel: &Rel) -> Result<()> {
// check if join filter is None
if join.post_join_filter.is_some() {
plan_err!(
"DataFusion generated Susbtrait plan cannot have post_join_filter in JoinRel"
"DataFusion generated Substrait plan cannot have post_join_filter in JoinRel"
)
} else {
// recursively check JoinRels
Expand Down

0 comments on commit 84d704a

Please sign in to comment.