Apache DataFusion SQL Query Engine
chore: fix typos of common and core packages (#11520)
JasonLi81a6094753b7
diff --git a/datafusion/common/src/column.rs b/datafusion/common/src/column.rsindex e36a4f8906..2e2bfff403 100644--- a/datafusion/common/src/column.rs+++ b/datafusion/common/src/column.rs@@ -214,7 +214,7 @@ impl Column {for using_col in using_columns {let all_matched = columns.iter().all(|f| using_col.contains(f));// All matched fields belong to the same using column set, in orther words- // the same join clause. We simply pick the qualifer from the first match.+ // the same join clause. We simply pick the qualifier from the first match.if all_matched {return Ok(columns[0].clone());}@@ -303,7 +303,7 @@ impl Column {for using_col in using_columns {let all_matched = columns.iter().all(|c| using_col.contains(c));// All matched fields belong to the same using column set, in orther words- // the same join clause. We simply pick the qualifer from the first match.+ // the same join clause. We simply pick the qualifier from the first match.if all_matched {return Ok(columns[0].clone());}diff --git a/datafusion/common/src/dfschema.rs b/datafusion/common/src/dfschema.rsindex 7598cbc4d8..eef0a03df7 100644--- a/datafusion/common/src/dfschema.rs+++ b/datafusion/common/src/dfschema.rs@@ -1310,7 +1310,7 @@ mod tests {])}#[test]- fn test_dfschema_to_schema_convertion() {+ fn test_dfschema_to_schema_conversion() {let mut a_metadata = HashMap::new();a_metadata.insert("key".to_string(), "value".to_string());let a_field = Field::new("a", DataType::Int64, false).with_metadata(a_metadata);diff --git a/datafusion/common/src/functional_dependencies.rs b/datafusion/common/src/functional_dependencies.rsindex d1c3747b52..452f1862b2 100644--- a/datafusion/common/src/functional_dependencies.rs+++ b/datafusion/common/src/functional_dependencies.rs@@ -433,7 +433,7 @@ impl FunctionalDependencies {}/// This function ensures that functional dependencies involving uniquely- /// occuring determinant keys cover their entire table in terms of+ /// occurring determinant keys cover their entire table in terms of/// dependent columns.pub fn extend_target_indices(&mut self, n_out: usize) {self.deps.iter_mut().for_each(diff --git a/datafusion/common/src/table_reference.rs b/datafusion/common/src/table_reference.rsindex b6ccaa74d5..67f3da4f48 100644--- a/datafusion/common/src/table_reference.rs+++ b/datafusion/common/src/table_reference.rs@@ -62,7 +62,7 @@ impl std::fmt::Display for ResolvedTableReference {/// assert_eq!(table_reference, TableReference::bare("mytable"));////// // Get a table reference to 'MyTable' (note the capitalization) using double quotes-/// // (programatically it is better to use `TableReference::bare` for this)+/// // (programmatically it is better to use `TableReference::bare` for this)/// let table_reference = TableReference::from(r#""MyTable""#);/// assert_eq!(table_reference, TableReference::bare("MyTable"));///diff --git a/datafusion/core/src/catalog/information_schema.rs b/datafusion/core/src/catalog/information_schema.rsindex c953de6d16..a79f62e742 100644--- a/datafusion/core/src/catalog/information_schema.rs+++ b/datafusion/core/src/catalog/information_schema.rs@@ -314,7 +314,7 @@ impl InformationSchemaTablesBuilder {table_name: impl AsRef<str>,table_type: TableType,) {- // Note: append_value is actually infallable.+ // Note: append_value is actually infallible.self.catalog_names.append_value(catalog_name.as_ref());self.schema_names.append_value(schema_name.as_ref());self.table_names.append_value(table_name.as_ref());@@ -405,7 +405,7 @@ impl InformationSchemaViewBuilder {table_name: impl AsRef<str>,definition: Option<impl AsRef<str>>,) {- // Note: append_value is actually infallable.+ // Note: append_value is actually infallible.self.catalog_names.append_value(catalog_name.as_ref());self.schema_names.append_value(schema_name.as_ref());self.table_names.append_value(table_name.as_ref());diff --git a/datafusion/core/src/datasource/file_format/arrow.rs b/datafusion/core/src/datasource/file_format/arrow.rsindex 9a3aa2454e..6bcbd43476 100644--- a/datafusion/core/src/datasource/file_format/arrow.rs+++ b/datafusion/core/src/datasource/file_format/arrow.rs@@ -353,7 +353,7 @@ async fn infer_schema_from_file_stream(// Expected format:// <magic number "ARROW1"> - 6 bytes// <empty padding bytes [to 8 byte boundary]> - 2 bytes- // <continutation: 0xFFFFFFFF> - 4 bytes, not present below v0.15.0+ // <continuation: 0xFFFFFFFF> - 4 bytes, not present below v0.15.0// <metadata_size: int32> - 4 bytes// <metadata_flatbuffer: bytes>// <rest of file bytes>@@ -365,7 +365,7 @@ async fn infer_schema_from_file_stream(// Files should start with these magic bytesif bytes[0..6] != ARROW_MAGIC {return Err(ArrowError::ParseError(- "Arrow file does not contian correct header".to_string(),+ "Arrow file does not contain correct header".to_string(),))?;}diff --git a/datafusion/core/src/datasource/file_format/csv.rs b/datafusion/core/src/datasource/file_format/csv.rsindex baeaf51fb5..5daa844755 100644--- a/datafusion/core/src/datasource/file_format/csv.rs+++ b/datafusion/core/src/datasource/file_format/csv.rs@@ -645,7 +645,7 @@ mod tests {let session_ctx = SessionContext::new_with_config(config);let state = session_ctx.state();let task_ctx = state.task_ctx();- // skip column 9 that overflows the automaticly discovered column type of i64 (u64 would work)+ // skip column 9 that overflows the automatically discovered column type of i64 (u64 would work)let projection = Some(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12]);let exec =get_exec(&state, "aggregate_test_100.csv", projection, None, true).await?;diff --git a/datafusion/core/src/datasource/file_format/parquet.rs b/datafusion/core/src/datasource/file_format/parquet.rsindex 6271d8af37..d4e77b911c 100644--- a/datafusion/core/src/datasource/file_format/parquet.rs+++ b/datafusion/core/src/datasource/file_format/parquet.rs@@ -854,14 +854,14 @@ fn spawn_column_parallel_row_group_writer(let mut col_array_channels = Vec::with_capacity(num_columns);for writer in col_writers.into_iter() {// Buffer size of this channel limits the number of arrays queued up for column level serialization- let (send_array, recieve_array) =+ let (send_array, receive_array) =mpsc::channel::<ArrowLeafColumn>(max_buffer_size);col_array_channels.push(send_array);let reservation =MemoryConsumer::new("ParquetSink(ArrowColumnWriter)").register(pool);let task = SpawnedTask::spawn(column_serializer_task(- recieve_array,+ receive_array,writer,reservation,));@@ -936,7 +936,7 @@ fn spawn_rg_join_and_finalize_task(/// row group is reached, the parallel tasks are joined on another separate task/// and sent to a concatenation task. This task immediately continues to work/// on the next row group in parallel. So, parquet serialization is parallelized-/// accross both columns and row_groups, with a theoretical max number of parallel tasks+/// across both columns and row_groups, with a theoretical max number of parallel tasks/// given by n_columns * num_row_groups.fn spawn_parquet_parallel_serialization_task(mut data: Receiver<RecordBatch>,@@ -1560,7 +1560,7 @@ mod tests {// . batch1 written into first file and includes:// - column c1 that has 3 rows with one null. Stats min and max of string column is missing for this test even the column has values// . batch2 written into second file and includes:- // - column c2 that has 3 rows with one null. Stats min and max of int are avaialble and 1 and 2 respectively+ // - column c2 that has 3 rows with one null. Stats min and max of int are available and 1 and 2 respectivelylet store = Arc::new(LocalFileSystem::new()) as _;let (files, _file_names) = store_parquet(vec![batch1, batch2], false).await?;@@ -2112,7 +2112,7 @@ mod tests {let path_parts = path.parts().collect::<Vec<_>>();assert_eq!(path_parts.len(), 1, "should not have path prefix");- assert_eq!(num_rows, 2, "file metdata to have 2 rows");+ assert_eq!(num_rows, 2, "file metadata to have 2 rows");assert!(schema.iter().any(|col_schema| col_schema.name == "a"),"output file metadata should contain col a"@@ -2208,7 +2208,7 @@ mod tests {);expected_partitions.remove(prefix);- assert_eq!(num_rows, 1, "file metdata to have 1 row");+ assert_eq!(num_rows, 1, "file metadata to have 1 row");assert!(!schema.iter().any(|col_schema| col_schema.name == "a"),"output file metadata will not contain partitioned col a"diff --git a/datafusion/core/src/datasource/file_format/write/demux.rs b/datafusion/core/src/datasource/file_format/write/demux.rsindex e29c877442..a58c77e313 100644--- a/datafusion/core/src/datasource/file_format/write/demux.rs+++ b/datafusion/core/src/datasource/file_format/write/demux.rs@@ -54,7 +54,7 @@ type DemuxedStreamReceiver = UnboundedReceiver<(Path, RecordBatchReceiver)>;/// which should be contained within the same output file. The outer channel/// is used to send a dynamic number of inner channels, representing a dynamic/// number of total output files. The caller is also responsible to monitor-/// the demux task for errors and abort accordingly. The single_file_ouput parameter+/// the demux task for errors and abort accordingly. The single_file_output parameter/// overrides all other settings to force only a single file to be written./// partition_by parameter will additionally split the input based on the unique/// values of a specific column `<https://github.com/apache/datafusion/issues/7744>``diff --git a/datafusion/core/src/datasource/file_format/write/orchestration.rs b/datafusion/core/src/datasource/file_format/write/orchestration.rsindex 8bd0dae9f5..f788865b07 100644--- a/datafusion/core/src/datasource/file_format/write/orchestration.rs+++ b/datafusion/core/src/datasource/file_format/write/orchestration.rs@@ -141,7 +141,7 @@ pub(crate) async fn stateless_serialize_and_write_files(// tracks the specific error triggering abortlet mut triggering_error = None;// tracks if any errors were encountered in the process of aborting writers.- // if true, we may not have a guarentee that all written data was cleaned up.+ // if true, we may not have a guarantee that all written data was cleaned up.let mut any_abort_errors = false;let mut join_set = JoinSet::new();while let Some((data_rx, serializer, writer)) = rx.recv().await {@@ -188,7 +188,7 @@ pub(crate) async fn stateless_serialize_and_write_files(true => return internal_err!("Error encountered during writing to ObjectStore and failed to abort all writers. Partial result may have been written."),false => match triggering_error {Some(e) => return Err(e),- None => return internal_err!("Unknown Error encountered during writing to ObjectStore. All writers succesfully aborted.")+ None => return internal_err!("Unknown Error encountered during writing to ObjectStore. All writers successfully aborted.")}}}@@ -268,7 +268,7 @@ pub(crate) async fn stateless_multipart_put(r2?;let total_count = rx_row_cnt.await.map_err(|_| {- internal_datafusion_err!("Did not receieve row count from write coordinater")+ internal_datafusion_err!("Did not receive row count from write coordinator")})?;Ok(total_count)diff --git a/datafusion/core/src/datasource/listing/helpers.rs b/datafusion/core/src/datasource/listing/helpers.rsindex c1ce4cc5b6..bfc33ce0bd 100644--- a/datafusion/core/src/datasource/listing/helpers.rs+++ b/datafusion/core/src/datasource/listing/helpers.rs@@ -759,7 +759,7 @@ mod tests {.otherwise(lit(false)).expect("valid case expr"))));- // static expression not relvant in this context but we+ // static expression not relevant in this context but we// test it as an edge case anyway in case we want to generalize// this helper functionassert!(expr_applicable_for_cols(&[], &lit(true)));diff --git a/datafusion/core/src/datasource/listing/table.rs b/datafusion/core/src/datasource/listing/table.rsindex ea4d396a14..1a7390d46f 100644--- a/datafusion/core/src/datasource/listing/table.rs+++ b/datafusion/core/src/datasource/listing/table.rs@@ -695,8 +695,8 @@ impl ListingTable {}/// Specify the SQL definition for this table, if any- pub fn with_definition(mut self, defintion: Option<String>) -> Self {- self.definition = defintion;+ pub fn with_definition(mut self, definition: Option<String>) -> Self {+ self.definition = definition;self}diff --git a/datafusion/core/src/datasource/listing/url.rs b/datafusion/core/src/datasource/listing/url.rsindex 73fffd8aba..7566df628e 100644--- a/datafusion/core/src/datasource/listing/url.rs+++ b/datafusion/core/src/datasource/listing/url.rs@@ -53,7 +53,7 @@ impl ListingTableUrl {/// subdirectories.////// Similarly `s3://BUCKET/blob.csv` refers to `blob.csv` in the S3 bucket `BUCKET`,- /// wherease `s3://BUCKET/foo/` refers to all objects with the prefix `foo/` in the+ /// whereas `s3://BUCKET/foo/` refers to all objects with the prefix `foo/` in the/// S3 bucket `BUCKET`////// # URL Encodingdiff --git a/datafusion/core/src/datasource/memory.rs b/datafusion/core/src/datasource/memory.rsindex aab42285a0..5c49282095 100644--- a/datafusion/core/src/datasource/memory.rs+++ b/datafusion/core/src/datasource/memory.rs@@ -644,7 +644,7 @@ mod tests {Ok(partitions)}- /// Returns the value of results. For example, returns 6 given the follwing+ /// Returns the value of results. For example, returns 6 given the following////// ```text/// +-------+,diff --git a/datafusion/core/src/datasource/physical_plan/file_scan_config.rs b/datafusion/core/src/datasource/physical_plan/file_scan_config.rsindex f5d3c7a641..17850ea758 100644--- a/datafusion/core/src/datasource/physical_plan/file_scan_config.rs+++ b/datafusion/core/src/datasource/physical_plan/file_scan_config.rs@@ -56,7 +56,7 @@ pub fn wrap_partition_type_in_dict(val_type: DataType) -> DataType {}/// Convert a [`ScalarValue`] of partition columns to a type, as-/// decribed in the documentation of [`wrap_partition_type_in_dict`],+/// described in the documentation of [`wrap_partition_type_in_dict`],/// which can wrap the types.pub fn wrap_partition_value_in_dict(val: ScalarValue) -> ScalarValue {ScalarValue::Dictionary(Box::new(DataType::UInt16), Box::new(val))@@ -682,7 +682,7 @@ mod tests {vec![table_partition_col.clone()],);- // verify the proj_schema inlcudes the last column and exactly the same the field it is defined+ // verify the proj_schema includes the last column and exactly the same the field it is definedlet (proj_schema, _proj_statistics, _) = conf.project();assert_eq!(proj_schema.fields().len(), file_schema.fields().len() + 1);assert_eq!(diff --git a/datafusion/core/src/datasource/physical_plan/parquet/row_group_filter.rs b/datafusion/core/src/datasource/physical_plan/parquet/row_group_filter.rsindex 9bc7980574..170beb15ea 100644--- a/datafusion/core/src/datasource/physical_plan/parquet/row_group_filter.rs+++ b/datafusion/core/src/datasource/physical_plan/parquet/row_group_filter.rs@@ -1123,7 +1123,7 @@ mod tests {}#[tokio::test]- async fn test_row_group_bloom_filter_pruning_predicate_mutiple_expr() {+ async fn test_row_group_bloom_filter_pruning_predicate_multiple_expr() {BloomFilterTest::new_data_index_bloom_encoding_stats().with_expect_all_pruned()// generate pruning predicate `(String = "Hello_Not_exists" OR String = "Hello_Not_exists2")`diff --git a/datafusion/core/src/datasource/physical_plan/parquet/statistics.rs b/datafusion/core/src/datasource/physical_plan/parquet/statistics.rsindex 59369aba57..44e22f7780 100644--- a/datafusion/core/src/datasource/physical_plan/parquet/statistics.rs+++ b/datafusion/core/src/datasource/physical_plan/parquet/statistics.rs@@ -2532,10 +2532,10 @@ mod test {fn timestamp_seconds_array(input: impl IntoIterator<Item = Option<i64>>,- timzezone: Option<&str>,+ timezone: Option<&str>,) -> ArrayRef {let array: TimestampSecondArray = input.into_iter().collect();- match timzezone {+ match timezone {Some(tz) => Arc::new(array.with_timezone(tz)),None => Arc::new(array),}@@ -2543,10 +2543,10 @@ mod test {fn timestamp_milliseconds_array(input: impl IntoIterator<Item = Option<i64>>,- timzezone: Option<&str>,+ timezone: Option<&str>,) -> ArrayRef {let array: TimestampMillisecondArray = input.into_iter().collect();- match timzezone {+ match timezone {Some(tz) => Arc::new(array.with_timezone(tz)),None => Arc::new(array),}@@ -2554,10 +2554,10 @@ mod test {fn timestamp_microseconds_array(input: impl IntoIterator<Item = Option<i64>>,- timzezone: Option<&str>,+ timezone: Option<&str>,) -> ArrayRef {let array: TimestampMicrosecondArray = input.into_iter().collect();- match timzezone {+ match timezone {Some(tz) => Arc::new(array.with_timezone(tz)),None => Arc::new(array),}@@ -2565,10 +2565,10 @@ mod test {fn timestamp_nanoseconds_array(input: impl IntoIterator<Item = Option<i64>>,- timzezone: Option<&str>,+ timezone: Option<&str>,) -> ArrayRef {let array: TimestampNanosecondArray = input.into_iter().collect();- match timzezone {+ match timezone {Some(tz) => Arc::new(array.with_timezone(tz)),None => Arc::new(array),}diff --git a/datafusion/core/src/datasource/schema_adapter.rs b/datafusion/core/src/datasource/schema_adapter.rsindex e8b64e9090..715e2da5d9 100644--- a/datafusion/core/src/datasource/schema_adapter.rs+++ b/datafusion/core/src/datasource/schema_adapter.rs@@ -251,7 +251,7 @@ mod tests {#[tokio::test]async fn can_override_schema_adapter() {- // Test shows that SchemaAdapter can add a column that doesn't existin in the+ // Test shows that SchemaAdapter can add a column that doesn't existing in the// record batches returned from parquet. This can be useful for schema evolution// where older files may not have all columns.let tmp_dir = TempDir::new().unwrap();diff --git a/datafusion/core/src/datasource/streaming.rs b/datafusion/core/src/datasource/streaming.rsindex 0ba6f85ec3..205faee433 100644--- a/datafusion/core/src/datasource/streaming.rs+++ b/datafusion/core/src/datasource/streaming.rs@@ -50,7 +50,7 @@ impl StreamingTable {if !schema.contains(partition_schema) {debug!("target schema does not contain partition schema. \- Target_schema: {schema:?}. Partiton Schema: {partition_schema:?}"+ Target_schema: {schema:?}. Partition Schema: {partition_schema:?}");return plan_err!("Mismatch between schema and batches");}diff --git a/datafusion/core/src/execution/context/mod.rs b/datafusion/core/src/execution/context/mod.rsindex 640a9b14a6..ac48788edb 100644--- a/datafusion/core/src/execution/context/mod.rs+++ b/datafusion/core/src/execution/context/mod.rs@@ -500,7 +500,7 @@ impl SessionContext {self.execute_logical_plan(plan).await}- /// Creates logical expresssions from SQL query text.+ /// Creates logical expressions from SQL query text.////// # Example: Parsing SQL queries///@@ -1352,7 +1352,7 @@ impl SessionContext {self.state.write().register_catalog_list(catalog_list)}- /// Registers a [`ConfigExtension`] as a table option extention that can be+ /// Registers a [`ConfigExtension`] as a table option extension that can be/// referenced from SQL statements executed against this context.pub fn register_table_options_extension<T: ConfigExtension>(&self, extension: T) {self.statediff --git a/datafusion/core/src/execution/session_state.rs b/datafusion/core/src/execution/session_state.rsindex 03ce8d3b58..bc5062893c 100644--- a/datafusion/core/src/execution/session_state.rs+++ b/datafusion/core/src/execution/session_state.rs@@ -1019,7 +1019,7 @@ impl SessionStateBuilder {self}- /// Set tje [`PhysicalOptimizerRule`]s used to optimize plans.+ /// Set the [`PhysicalOptimizerRule`]s used to optimize plans.pub fn with_physical_optimizer_rules(mut self,physical_optimizers: Vec<Arc<dyn PhysicalOptimizerRule + Send + Sync>>,diff --git a/datafusion/core/src/physical_optimizer/combine_partial_final_agg.rs b/datafusion/core/src/physical_optimizer/combine_partial_final_agg.rsindex 940b09131a..56cdbd6452 100644--- a/datafusion/core/src/physical_optimizer/combine_partial_final_agg.rs+++ b/datafusion/core/src/physical_optimizer/combine_partial_final_agg.rs@@ -354,7 +354,7 @@ mod tests {PhysicalGroupBy::default(),aggr_expr,);- // should combine the Partial/Final AggregateExecs to tne Single AggregateExec+ // should combine the Partial/Final AggregateExecs to the Single AggregateExeclet expected = &["AggregateExec: mode=Single, gby=[], aggr=[COUNT(1)]","ParquetExec: file_groups={1 group: [[x]]}, projection=[a, b, c]",@@ -394,7 +394,7 @@ mod tests {let final_group_by = PhysicalGroupBy::new_single(groups);let plan = final_aggregate_exec(partial_agg, final_group_by, aggr_expr);- // should combine the Partial/Final AggregateExecs to tne Single AggregateExec+ // should combine the Partial/Final AggregateExecs to the Single AggregateExeclet expected = &["AggregateExec: mode=Single, gby=[c@2 as c], aggr=[Sum(b)]","ParquetExec: file_groups={1 group: [[x]]}, projection=[a, b, c]",diff --git a/datafusion/core/src/physical_optimizer/enforce_distribution.rs b/datafusion/core/src/physical_optimizer/enforce_distribution.rsindex f7c2aee578..818b2304fe 100644--- a/datafusion/core/src/physical_optimizer/enforce_distribution.rs+++ b/datafusion/core/src/physical_optimizer/enforce_distribution.rs@@ -392,7 +392,7 @@ fn adjust_input_keys_ordering(let expr = proj.expr();// For Projection, we need to transform the requirements to the columns before the Projection// And then to push down the requirements- // Construct a mapping from new name to the orginal Column+ // Construct a mapping from new name to the original Columnlet new_required = map_columns_before_projection(&requirements.data, expr);if new_required.len() == requirements.data.len() {requirements.children[0].data = new_required;@@ -566,7 +566,7 @@ fn shift_right_required(}).collect::<Vec<_>>();- // if the parent required are all comming from the right side, the requirements can be pushdown+ // if the parent required are all coming from the right side, the requirements can be pushdown(new_right_required.len() == parent_required.len()).then_some(new_right_required)}diff --git a/datafusion/core/src/physical_optimizer/join_selection.rs b/datafusion/core/src/physical_optimizer/join_selection.rsindex 1613e50898..6dfe17632a 100644--- a/datafusion/core/src/physical_optimizer/join_selection.rs+++ b/datafusion/core/src/physical_optimizer/join_selection.rs@@ -719,7 +719,7 @@ mod tests_statistical {use rstest::rstest;- /// Return statistcs for empty table+ /// Return statistics for empty tablefn empty_statistics() -> Statistics {Statistics {num_rows: Precision::Absent,@@ -737,7 +737,7 @@ mod tests_statistical {)}- /// Return statistcs for small table+ /// Return statistics for small tablefn small_statistics() -> Statistics {let (threshold_num_rows, threshold_byte_size) = get_thresholds();Statistics {@@ -747,7 +747,7 @@ mod tests_statistical {}}- /// Return statistcs for big table+ /// Return statistics for big tablefn big_statistics() -> Statistics {let (threshold_num_rows, threshold_byte_size) = get_thresholds();Statistics {@@ -757,7 +757,7 @@ mod tests_statistical {}}- /// Return statistcs for big table+ /// Return statistics for big tablefn bigger_statistics() -> Statistics {let (threshold_num_rows, threshold_byte_size) = get_thresholds();Statistics {diff --git a/datafusion/core/src/physical_optimizer/projection_pushdown.rs b/datafusion/core/src/physical_optimizer/projection_pushdown.rsindex 3c2be59f75..24d9f31687 100644--- a/datafusion/core/src/physical_optimizer/projection_pushdown.rs+++ b/datafusion/core/src/physical_optimizer/projection_pushdown.rs@@ -18,7 +18,7 @@//! This file implements the `ProjectionPushdown` physical optimization rule.//! The function [`remove_unnecessary_projections`] tries to push down all//! projections one by one if the operator below is amenable to this. If a-//! projection reaches a source, it can even dissappear from the plan entirely.+//! projection reaches a source, it can even disappear from the plan entirely.use std::collections::HashMap;use std::sync::Arc;diff --git a/datafusion/core/src/physical_optimizer/pruning.rs b/datafusion/core/src/physical_optimizer/pruning.rsindex a7ce29bdc7..a1ace22998 100644--- a/datafusion/core/src/physical_optimizer/pruning.rs+++ b/datafusion/core/src/physical_optimizer/pruning.rs@@ -623,7 +623,7 @@ impl PruningPredicate {////// This is useful to avoid fetching statistics for columns that will not be/// used in the predicate. For example, it can be used to avoid reading- /// uneeded bloom filters (a non trivial operation).+ /// unneeded bloom filters (a non trivial operation).pub fn literal_columns(&self) -> Vec<String> {let mut seen = HashSet::new();self.literal_guaranteesdiff --git a/datafusion/core/src/physical_optimizer/update_aggr_exprs.rs b/datafusion/core/src/physical_optimizer/update_aggr_exprs.rsindex 1ad4179cef..d6b4c33384 100644--- a/datafusion/core/src/physical_optimizer/update_aggr_exprs.rs+++ b/datafusion/core/src/physical_optimizer/update_aggr_exprs.rs@@ -128,7 +128,7 @@ impl PhysicalOptimizerRule for OptimizeAggregateOrder {/// # Returns////// Returns `Ok(converted_aggr_exprs)` if the conversion process completes-/// successfully. Any errors occuring during the conversion process are+/// successfully. Any errors occurring during the conversion process are/// passed through.fn try_convert_aggregate_if_better(aggr_exprs: Vec<Arc<dyn AggregateExpr>>,diff --git a/datafusion/core/tests/dataframe/mod.rs b/datafusion/core/tests/dataframe/mod.rsindex 1b2a6770cf..9f7bd5227e 100644--- a/datafusion/core/tests/dataframe/mod.rs+++ b/datafusion/core/tests/dataframe/mod.rs@@ -99,7 +99,7 @@ async fn test_count_wildcard_on_where_in() -> Result<()> {// In the same SessionContext, AliasGenerator will increase subquery_alias id by 1// https://github.com/apache/datafusion/blame/cf45eb9020092943b96653d70fafb143cc362e19/datafusion/optimizer/src/alias.rs#L40-L43- // for compare difference betwwen sql and df logical plan, we need to create a new SessionContext here+ // for compare difference between sql and df logical plan, we need to create a new SessionContext herelet ctx = create_join_context()?;let df_results = ctx.table("t1")diff --git a/datafusion/core/tests/memory_limit/mod.rs b/datafusion/core/tests/memory_limit/mod.rsindex 1d151f9fd3..f4f4f8cd89 100644--- a/datafusion/core/tests/memory_limit/mod.rs+++ b/datafusion/core/tests/memory_limit/mod.rs@@ -259,7 +259,7 @@ async fn sort_spill_reservation() {.with_query("select * from t ORDER BY a , b DESC")// enough memory to sort if we don't try to merge it all at once.with_memory_limit(partition_size)- // use a single partiton so only a sort is needed+ // use a single partition so only a sort is needed.with_scenario(scenario).with_disk_manager_config(DiskManagerConfig::NewOs).with_expected_plan(@@ -361,7 +361,7 @@ struct TestCase {/// How should the disk manager (that allows spilling) be/// configured? Defaults to `Disabled`disk_manager_config: DiskManagerConfig,- /// Expected explain plan, if non emptry+ /// Expected explain plan, if non-emptyexpected_plan: Vec<String>,/// Is the plan expected to pass? Defaults to falseexpected_success: bool,diff --git a/datafusion/core/tests/parquet/arrow_statistics.rs b/datafusion/core/tests/parquet/arrow_statistics.rsindex 2b4ba0b171..623f321ce1 100644--- a/datafusion/core/tests/parquet/arrow_statistics.rs+++ b/datafusion/core/tests/parquet/arrow_statistics.rs@@ -579,7 +579,7 @@ async fn test_data_page_stats_with_all_null_page() {/////////////// MORE GENERAL TESTS //////////////////////// . Many columns in a file-// . Differnet data types+// . Different data types// . Different row group sizes// Four different integer types@@ -1733,7 +1733,7 @@ async fn test_float16() {#[tokio::test]async fn test_decimal() {- // This creates a parquet file of 1 column "decimal_col" with decimal data type and precicion 9, scale 2+ // This creates a parquet file of 1 column "decimal_col" with decimal data type and precision 9, scale 2// file has 3 record batches, each has 5 rows. They will be saved into 3 row groupslet reader = TestReader {scenario: Scenario::Decimal,@@ -1763,7 +1763,7 @@ async fn test_decimal() {}#[tokio::test]async fn test_decimal_256() {- // This creates a parquet file of 1 column "decimal256_col" with decimal data type and precicion 9, scale 2+ // This creates a parquet file of 1 column "decimal256_col" with decimal data type and precision 9, scale 2// file has 3 record batches, each has 5 rows. They will be saved into 3 row groupslet reader = TestReader {scenario: Scenario::Decimal256,diff --git a/datafusion/core/tests/parquet/schema.rs b/datafusion/core/tests/parquet/schema.rsindex 1b572914d7..e13fbad244 100644--- a/datafusion/core/tests/parquet/schema.rs+++ b/datafusion/core/tests/parquet/schema.rs@@ -25,7 +25,7 @@ use datafusion_common::assert_batches_sorted_eq;#[tokio::test]async fn schema_merge_ignores_metadata_by_default() {- // Create several parquet files in same directoty / table with+ // Create several parquet files in same directory / table with// same schema but different metadatalet tmp_dir = TempDir::new().unwrap();let table_dir = tmp_dir.path().join("parquet_test");@@ -103,7 +103,7 @@ async fn schema_merge_ignores_metadata_by_default() {#[tokio::test]async fn schema_merge_can_preserve_metadata() {- // Create several parquet files in same directoty / table with+ // Create several parquet files in same directory / table with// same schema but different metadatalet tmp_dir = TempDir::new().unwrap();let table_dir = tmp_dir.path().join("parquet_test");diff --git a/datafusion/core/tests/sql/explain_analyze.rs b/datafusion/core/tests/sql/explain_analyze.rsindex 502590f9e2..fe4777b043 100644--- a/datafusion/core/tests/sql/explain_analyze.rs+++ b/datafusion/core/tests/sql/explain_analyze.rs@@ -352,7 +352,7 @@ async fn csv_explain_verbose() {// flatten to a single stringlet actual = actual.into_iter().map(|r| r.join("\t")).collect::<String>();- // Don't actually test the contents of the debuging output (as+ // Don't actually test the contents of the debugging output (as// that may change and keeping this test updated will be a// pain). Instead just check for a few key pieces.assert_contains!(&actual, "logical_plan");diff --git a/datafusion/core/tests/user_defined/user_defined_scalar_functions.rs b/datafusion/core/tests/user_defined/user_defined_scalar_functions.rsindex 5847952ae6..219f6c26cf 100644--- a/datafusion/core/tests/user_defined/user_defined_scalar_functions.rs+++ b/datafusion/core/tests/user_defined/user_defined_scalar_functions.rs@@ -941,11 +941,11 @@ async fn create_scalar_function_from_sql_statement() -> Result<()> {/// Saves whatever is passed to it as a scalar function#[derive(Debug, Default)]-struct RecordingFunctonFactory {+struct RecordingFunctionFactory {calls: Mutex<Vec<CreateFunction>>,}-impl RecordingFunctonFactory {+impl RecordingFunctionFactory {fn new() -> Self {Self::default()}@@ -957,7 +957,7 @@ impl RecordingFunctonFactory {}#[async_trait::async_trait]-impl FunctionFactory for RecordingFunctonFactory {+impl FunctionFactory for RecordingFunctionFactory {async fn create(&self,_state: &SessionState,@@ -972,7 +972,7 @@ impl FunctionFactory for RecordingFunctonFactory {#[tokio::test]async fn create_scalar_function_from_sql_statement_postgres_syntax() -> Result<()> {- let function_factory = Arc::new(RecordingFunctonFactory::new());+ let function_factory = Arc::new(RecordingFunctionFactory::new());let ctx = SessionContext::new().with_function_factory(function_factory.clone());let sql = r#"