Skip to content

Commit 1c86ec7

Browse files
waynexiafindepi
andauthored
chore: fix typos (#17135)
Co-authored-by: Piotr Findeisen <[email protected]>
1 parent b6a8a0e commit 1c86ec7

File tree

68 files changed

+137
-133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+137
-133
lines changed

benchmarks/src/bin/external_aggr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl ExternalAggrConfig {
113113
"#,
114114
];
115115

116-
/// If `--query` and `--memory-limit` is not speicified, run all queries
116+
/// If `--query` and `--memory-limit` is not specified, run all queries
117117
/// with pre-configured memory limits
118118
/// If only `--query` is specified, run the query with all memory limits
119119
/// for this query

datafusion-cli/tests/cli_integration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ async fn setup_minio_container() -> ContainerAsync<minio::MinIO> {
6464

6565
match container {
6666
Ok(container) => {
67-
// We wait for MinIO to be healthy and preprare test files. We do it via CLI to avoid s3 dependency
67+
// We wait for MinIO to be healthy and prepare test files. We do it via CLI to avoid s3 dependency
6868
let commands = [
6969
ExecCommand::new(["/usr/bin/mc", "ready", "local"]),
7070
ExecCommand::new([

datafusion-examples/examples/custom_file_casts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use object_store::path::Path;
4141
use object_store::{ObjectStore, PutPayload};
4242

4343
// Example showing how to implement custom casting rules to adapt file schemas.
44-
// This example enforces that casts must be stricly widening: if the file type is Int64 and the table type is Int32, it will error
44+
// This example enforces that casts must be strictly widening: if the file type is Int64 and the table type is Int32, it will error
4545
// before even reading the data.
4646
// Without this custom cast rule DataFusion would happily do the narrowing cast, potentially erroring only if it found a row with data it could not cast.
4747

datafusion-examples/examples/expr_api.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ async fn main() -> Result<()> {
8585
boundary_analysis_and_selectivity_demo()?;
8686

8787
// See how boundary analysis works for `AND` & `OR` conjunctions.
88-
boundary_analysis_in_conjuctions_demo()?;
88+
boundary_analysis_in_conjunctions_demo()?;
8989

9090
// See how to determine the data types of expressions
9191
expression_type_demo()?;
@@ -351,7 +351,7 @@ fn boundary_analysis_and_selectivity_demo() -> Result<()> {
351351

352352
/// This function shows how to think about and leverage the analysis API
353353
/// to infer boundaries in `AND` & `OR` conjunctions.
354-
fn boundary_analysis_in_conjuctions_demo() -> Result<()> {
354+
fn boundary_analysis_in_conjunctions_demo() -> Result<()> {
355355
// Let us consider the more common case of AND & OR conjunctions.
356356
//
357357
// age > 18 AND age <= 25

datafusion/catalog/src/information_schema.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ impl InformationSchemaColumnsBuilder {
810810
) {
811811
use DataType::*;
812812

813-
// Note: append_value is actually infallable.
813+
// Note: append_value is actually infallible.
814814
self.catalog_names.append_value(catalog_name);
815815
self.schema_names.append_value(schema_name);
816816
self.table_names.append_value(table_name);

datafusion/common/src/test_util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ macro_rules! assert_batches_sorted_eq {
158158
/// Is a macro so test error
159159
/// messages are on the same line as the failure;
160160
///
161-
/// Both arguments must be convertable into Strings ([`Into`]<[`String`]>)
161+
/// Both arguments must be convertible into Strings ([`Into`]<[`String`]>)
162162
#[macro_export]
163163
macro_rules! assert_contains {
164164
($ACTUAL: expr, $EXPECTED: expr) => {
@@ -181,7 +181,7 @@ macro_rules! assert_contains {
181181
/// Is a macro so test error
182182
/// messages are on the same line as the failure;
183183
///
184-
/// Both arguments must be convertable into Strings ([`Into`]<[`String`]>)
184+
/// Both arguments must be convertible into Strings ([`Into`]<[`String`]>)
185185
#[macro_export]
186186
macro_rules! assert_not_contains {
187187
($ACTUAL: expr, $UNEXPECTED: expr) => {

datafusion/core/benches/spm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ fn generate_spm_for_round_robin_tie_breaker(
6666
};
6767

6868
let rbs = (0..batch_count).map(|_| rb.clone()).collect::<Vec<_>>();
69-
let partitiones = vec![rbs.clone(); partition_count];
69+
let partitions = vec![rbs.clone(); partition_count];
7070

7171
let schema = rb.schema();
7272
let sort = [
@@ -81,7 +81,7 @@ fn generate_spm_for_round_robin_tie_breaker(
8181
]
8282
.into();
8383

84-
let exec = MemorySourceConfig::try_new_exec(&partitiones, schema, None).unwrap();
84+
let exec = MemorySourceConfig::try_new_exec(&partitions, schema, None).unwrap();
8585
SortPreservingMergeExec::new(sort, exec)
8686
.with_round_robin_repartition(enable_round_robin_repartition)
8787
}

datafusion/core/src/bin/print_functions_docs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ fn print_docs(
260260
}
261261
}
262262

263-
/// Trait for accessing name / aliases / documentation for differnet functions
263+
/// Trait for accessing name / aliases / documentation for different functions
264264
trait DocProvider {
265265
fn get_name(&self) -> String;
266266
fn get_aliases(&self) -> Vec<String>;

datafusion/core/src/datasource/listing/table.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -215,16 +215,16 @@ impl ListingTableConfig {
215215
) -> Result<(String, Option<String>)> {
216216
let mut exts = path.rsplit('.');
217217

218-
let splitted = exts.next().unwrap_or("");
218+
let split = exts.next().unwrap_or("");
219219

220-
let file_compression_type = FileCompressionType::from_str(splitted)
220+
let file_compression_type = FileCompressionType::from_str(split)
221221
.unwrap_or(FileCompressionType::UNCOMPRESSED);
222222

223223
if file_compression_type.is_compressed() {
224-
let splitted2 = exts.next().unwrap_or("");
225-
Ok((splitted2.to_string(), Some(splitted.to_string())))
224+
let split2 = exts.next().unwrap_or("");
225+
Ok((split2.to_string(), Some(split.to_string())))
226226
} else {
227-
Ok((splitted.to_string(), None))
227+
Ok((split.to_string(), None))
228228
}
229229
}
230230

@@ -502,7 +502,7 @@ impl ListingOptions {
502502
///
503503
/// Currently this sets `target_partitions` and `collect_stat`
504504
/// but if more options are added in the future that need to be coordinated
505-
/// they will be synchronized thorugh this method.
505+
/// they will be synchronized through this method.
506506
pub fn with_session_config_options(mut self, config: &SessionConfig) -> Self {
507507
self = self.with_target_partitions(config.target_partitions());
508508
self = self.with_collect_stat(config.collect_statistics());
@@ -1132,8 +1132,8 @@ impl ListingTable {
11321132
}
11331133

11341134
// Expressions can be used for parttion pruning if they can be evaluated using
1135-
// only the partiton columns and there are partition columns.
1136-
fn can_be_evaluted_for_partition_pruning(
1135+
// only the partition columns and there are partition columns.
1136+
fn can_be_evaluated_for_partition_pruning(
11371137
partition_column_names: &[&str],
11381138
expr: &Expr,
11391139
) -> bool {
@@ -1182,7 +1182,7 @@ impl TableProvider for ListingTable {
11821182
// pushdown it to TableScan, otherwise, `unhandled` pruning predicates will be generated
11831183
let (partition_filters, filters): (Vec<_>, Vec<_>) =
11841184
filters.iter().cloned().partition(|filter| {
1185-
can_be_evaluted_for_partition_pruning(&table_partition_col_names, filter)
1185+
can_be_evaluated_for_partition_pruning(&table_partition_col_names, filter)
11861186
});
11871187

11881188
// We should not limit the number of partitioned files to scan if there are filters and limit
@@ -1271,7 +1271,7 @@ impl TableProvider for ListingTable {
12711271
filters
12721272
.iter()
12731273
.map(|filter| {
1274-
if can_be_evaluted_for_partition_pruning(&partition_column_names, filter)
1274+
if can_be_evaluated_for_partition_pruning(&partition_column_names, filter)
12751275
{
12761276
// if filter can be handled by partition pruning, it is exact
12771277
return Ok(TableProviderFilterPushDown::Exact);

datafusion/core/src/datasource/physical_plan/parquet.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ mod tests {
332332
let metric = get_value(&metrics, "pushdown_rows_pruned");
333333
assert_eq!(metric, 3, "Expected all rows to be pruned");
334334

335-
// If we excplicitly allow nulls the rest of the predicate should work
335+
// If we explicitly allow nulls the rest of the predicate should work
336336
let filter = col("c2").is_null().and(col("c1").eq(lit(1_i32)));
337337
let rt = RoundTrip::new()
338338
.with_table_schema(table_schema.clone())
@@ -390,7 +390,7 @@ mod tests {
390390
let metric = get_value(&metrics, "pushdown_rows_pruned");
391391
assert_eq!(metric, 3, "Expected all rows to be pruned");
392392

393-
// If we excplicitly allow nulls the rest of the predicate should work
393+
// If we explicitly allow nulls the rest of the predicate should work
394394
let filter = col("c2").is_null().and(col("c1").eq(lit(1_i32)));
395395
let rt = RoundTrip::new()
396396
.with_table_schema(table_schema.clone())
@@ -452,7 +452,7 @@ mod tests {
452452
let metric = get_value(&metrics, "pushdown_rows_pruned");
453453
assert_eq!(metric, 3, "Expected all rows to be pruned");
454454

455-
// If we excplicitly allow nulls the rest of the predicate should work
455+
// If we explicitly allow nulls the rest of the predicate should work
456456
let filter = col("c2").is_null().and(col("c1").eq(lit(1_i32)));
457457
let rt = RoundTrip::new()
458458
.with_table_schema(table_schema.clone())
@@ -514,7 +514,7 @@ mod tests {
514514
let metric = get_value(&metrics, "pushdown_rows_pruned");
515515
assert_eq!(metric, 3, "Expected all rows to be pruned");
516516

517-
// If we excplicitly allow nulls the rest of the predicate should work
517+
// If we explicitly allow nulls the rest of the predicate should work
518518
let filter = col("c2").is_null().and(col("c3").eq(lit(7_i32)));
519519
let rt = RoundTrip::new()
520520
.with_table_schema(table_schema.clone())

0 commit comments

Comments
 (0)