-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minor: fix typos in comments / structure names #13879
Changes from 3 commits
22ac793
0928228
df8c517
7828c78
84d704a
352479e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -82,7 +82,7 @@ use url::Url; | |||||
/// Specifically, this example illustrates how to: | ||||||
/// 1. Use [`ParquetFileReaderFactory`] to avoid re-reading parquet metadata on each query | ||||||
/// 2. Use [`PruningPredicate`] for predicate analysis | ||||||
/// 3. Pass a row group selection to [`ParuetExec`] | ||||||
/// 3. Pass a row group selection to [`ParquetExec`] | ||||||
/// 4. Pass a row selection (within a row group) to [`ParquetExec`] | ||||||
/// | ||||||
/// Note this is a *VERY* low level example for people who want to build their | ||||||
|
@@ -211,7 +211,7 @@ async fn main() -> Result<()> { | |||||
// | ||||||
// Note: in order to prune pages, the Page Index must be loaded and the | ||||||
// ParquetExec will load it on demand if not present. To avoid a second IO | ||||||
// during query, this example loaded the Page Index pre-emptively by setting | ||||||
// during query, this example loaded the Page Index pre-emptily by setting | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is actually meant to be something different:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I got it, I will recover it |
||||||
// `ArrowReader::with_page_index` in `IndexedFile::try_new` | ||||||
provider.set_use_row_selection(true); | ||||||
println!("** Select data, predicate `id = 950`"); | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,11 +46,11 @@ async fn main() -> Result<()> { | |
|
||
let ctx = SessionContext::new(); | ||
let state = ctx.state(); | ||
let cataloglist = Arc::new(CustomCatalogProviderList::new()); | ||
let catalog_list = Arc::new(CustomCatalogProviderList::new()); | ||
|
||
// use our custom catalog list for context. each context has a single catalog list. | ||
// context will by default have [`MemoryCatalogProviderList`] | ||
ctx.register_catalog_list(cataloglist.clone()); | ||
ctx.register_catalog_list(catalog_list.clone()); | ||
|
||
// initialize our catalog and schemas | ||
let catalog = DirCatalog::new(); | ||
|
@@ -81,7 +81,7 @@ async fn main() -> Result<()> { | |
ctx.register_catalog("dircat", Arc::new(catalog)); | ||
{ | ||
// catalog was passed down into our custom catalog list since we override the ctx's default | ||
let catalogs = cataloglist.catalogs.read().unwrap(); | ||
let catalogs = catalog_list.catalogs.read().unwrap(); | ||
assert!(catalogs.contains_key("dircat")); | ||
}; | ||
|
||
|
@@ -144,8 +144,8 @@ impl DirSchema { | |
async fn create(state: &SessionState, opts: DirSchemaOpts<'_>) -> Result<Arc<Self>> { | ||
let DirSchemaOpts { ext, dir, format } = opts; | ||
let mut tables = HashMap::new(); | ||
let direntries = std::fs::read_dir(dir).unwrap(); | ||
for res in direntries { | ||
let directories = std::fs::read_dir(dir).unwrap(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is dir_entries |
||
for res in directories { | ||
let entry = res.unwrap(); | ||
let filename = entry.file_name().to_str().unwrap().to_string(); | ||
if !filename.ends_with(ext) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think technically thiserror refers to https://crates.io/crates/thiserror
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I got it, I will recover it