Skip to content

Commit e718c1a

Browse files
authored
minor: fix typos in comments / structure names (#13879)
* minor: fix typo error in datafusion * fix: fix rebase error * fix: format HashJoinExec doc * doc: recover thiserror/preemptively * fix: other typo error fixed * fix: directories to dir_entries in catalog example
1 parent 63ba5b6 commit e718c1a

File tree

138 files changed

+277
-277
lines changed

Some content is hidden

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

138 files changed

+277
-277
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ version = "43.0.0"
7373
# selectively turn them on if needed, since we can override default-features = true (from false)
7474
# for the inherited dependency but cannot do the reverse (override from true to false).
7575
#
76-
# See for more detaiils: https://github.com/rust-lang/cargo/issues/11329
76+
# See for more details: https://github.com/rust-lang/cargo/issues/11329
7777
ahash = { version = "0.8", default-features = false, features = [
7878
"runtime-rng",
7979
] }

datafusion-cli/src/functions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ impl TableFunctionImpl for ParquetMetadataFunc {
360360
Field::new("total_uncompressed_size", DataType::Int64, true),
361361
]));
362362

363-
// construct recordbatch from metadata
363+
// construct record batch from metadata
364364
let mut filename_arr = vec![];
365365
let mut row_group_id_arr = vec![];
366366
let mut row_group_num_rows_arr = vec![];

datafusion-examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
This crate includes end to end, highly commented examples of how to use
2323
various DataFusion APIs to help you get started.
2424

25-
## Prerequisites:
25+
## Prerequisites
2626

2727
Run `git submodule update --init` to init test files.
2828

datafusion-examples/examples/advanced_parquet_index.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ use url::Url;
8282
/// Specifically, this example illustrates how to:
8383
/// 1. Use [`ParquetFileReaderFactory`] to avoid re-reading parquet metadata on each query
8484
/// 2. Use [`PruningPredicate`] for predicate analysis
85-
/// 3. Pass a row group selection to [`ParuetExec`]
85+
/// 3. Pass a row group selection to [`ParquetExec`]
8686
/// 4. Pass a row selection (within a row group) to [`ParquetExec`]
8787
///
8888
/// Note this is a *VERY* low level example for people who want to build their
@@ -211,7 +211,7 @@ async fn main() -> Result<()> {
211211
//
212212
// Note: in order to prune pages, the Page Index must be loaded and the
213213
// ParquetExec will load it on demand if not present. To avoid a second IO
214-
// during query, this example loaded the Page Index pre-emptively by setting
214+
// during query, this example loaded the Page Index preemptively by setting
215215
// `ArrowReader::with_page_index` in `IndexedFile::try_new`
216216
provider.set_use_row_selection(true);
217217
println!("** Select data, predicate `id = 950`");

datafusion-examples/examples/analyzer_rule.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ impl AnalyzerRule for RowLevelAccessControl {
138138
fn analyze(&self, plan: LogicalPlan, _config: &ConfigOptions) -> Result<LogicalPlan> {
139139
// use the TreeNode API to recursively walk the LogicalPlan tree
140140
// and all of its children (inputs)
141-
let transfomed_plan = plan.transform(|plan| {
141+
let transformed_plan = plan.transform(|plan| {
142142
// This closure is called for each LogicalPlan node
143143
// if it is a Scan node, add a filter to remove all managers
144144
if is_employee_table_scan(&plan) {
@@ -166,7 +166,7 @@ impl AnalyzerRule for RowLevelAccessControl {
166166
//
167167
// This example does not need the value of either flag, so simply
168168
// extract the LogicalPlan "data"
169-
Ok(transfomed_plan.data)
169+
Ok(transformed_plan.data)
170170
}
171171

172172
fn name(&self) -> &str {

datafusion-examples/examples/catalog.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ async fn main() -> Result<()> {
4646

4747
let ctx = SessionContext::new();
4848
let state = ctx.state();
49-
let cataloglist = Arc::new(CustomCatalogProviderList::new());
49+
let catalog_list = Arc::new(CustomCatalogProviderList::new());
5050

5151
// use our custom catalog list for context. each context has a single catalog list.
5252
// context will by default have [`MemoryCatalogProviderList`]
53-
ctx.register_catalog_list(cataloglist.clone());
53+
ctx.register_catalog_list(catalog_list.clone());
5454

5555
// initialize our catalog and schemas
5656
let catalog = DirCatalog::new();
@@ -81,7 +81,7 @@ async fn main() -> Result<()> {
8181
ctx.register_catalog("dircat", Arc::new(catalog));
8282
{
8383
// catalog was passed down into our custom catalog list since we override the ctx's default
84-
let catalogs = cataloglist.catalogs.read().unwrap();
84+
let catalogs = catalog_list.catalogs.read().unwrap();
8585
assert!(catalogs.contains_key("dircat"));
8686
};
8787

@@ -144,8 +144,8 @@ impl DirSchema {
144144
async fn create(state: &SessionState, opts: DirSchemaOpts<'_>) -> Result<Arc<Self>> {
145145
let DirSchemaOpts { ext, dir, format } = opts;
146146
let mut tables = HashMap::new();
147-
let direntries = std::fs::read_dir(dir).unwrap();
148-
for res in direntries {
147+
let dir_entries = std::fs::read_dir(dir).unwrap();
148+
for res in dir_entries {
149149
let entry = res.unwrap();
150150
let filename = entry.file_name().to_str().unwrap().to_string();
151151
if !filename.ends_with(ext) {

datafusion-examples/examples/expr_api.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ use datafusion_optimizer::analyzer::type_coercion::TypeCoercionRewriter;
5353
/// 4. Simplify expressions: [`simplify_demo`]
5454
/// 5. Analyze predicates for boundary ranges: [`range_analysis_demo`]
5555
/// 6. Get the types of the expressions: [`expression_type_demo`]
56-
/// 7. Apply type cocercion to expressions: [`type_coercion_demo`]
56+
/// 7. Apply type coercion to expressions: [`type_coercion_demo`]
5757
#[tokio::main]
5858
async fn main() -> Result<()> {
5959
// The easiest way to do create expressions is to use the
@@ -392,7 +392,7 @@ fn type_coercion_demo() -> Result<()> {
392392
)?;
393393
assert!(physical_expr.evaluate(&batch).is_ok());
394394

395-
// 4. Apply explict type coercion by manually rewriting the expression
395+
// 4. Apply explicit type coercion by manually rewriting the expression
396396
let coerced_expr = expr
397397
.transform(|e| {
398398
// Only type coerces binary expressions.

datafusion-examples/examples/function_factory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use datafusion_expr::{
3636
///
3737
/// Apart from [FunctionFactory], this example covers
3838
/// [ScalarUDFImpl::simplify()] which is often used at the same time, to replace
39-
/// a function call with another expression at rutime.
39+
/// a function call with another expression at runtime.
4040
///
4141
/// This example is rather simple and does not cover all cases required for a
4242
/// real implementation.

datafusion-examples/examples/memtable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use std::sync::Arc;
2525
use std::time::Duration;
2626
use tokio::time::timeout;
2727

28-
/// This example demonstrates executing a simple query against a Memtable
28+
/// This example demonstrates executing a simple query against a [`MemTable`]
2929
#[tokio::main]
3030
async fn main() -> Result<()> {
3131
let mem_table = create_memtable()?;

datafusion-examples/examples/optimizer_rule.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl MyOptimizerRule {
146146
// Closure called for each sub tree
147147
match expr {
148148
Expr::BinaryExpr(binary_expr) if is_binary_eq(&binary_expr) => {
149-
// destruture the expression
149+
// destructure the expression
150150
let BinaryExpr { left, op: _, right } = binary_expr;
151151
// rewrite to `my_eq(left, right)`
152152
let udf = ScalarUDF::new_from_impl(MyEq::new());

0 commit comments

Comments
 (0)