This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 1f90b0060b chore: improve variable naming conventions (#12042)
1f90b0060b is described below

commit 1f90b0060baf94d1b5d7388718c26ae53d08c080
Author: Cancai Cai <[email protected]>
AuthorDate: Sat Aug 17 18:48:24 2024 +0800

    chore: improve variable naming conventions (#12042)
---
 datafusion-examples/examples/catalog.rs | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/datafusion-examples/examples/catalog.rs 
b/datafusion-examples/examples/catalog.rs
index f770056026..8c2b1aad56 100644
--- a/datafusion-examples/examples/catalog.rs
+++ b/datafusion-examples/examples/catalog.rs
@@ -46,11 +46,11 @@ async fn main() -> Result<()> {
 
     let ctx = SessionContext::new();
     let state = ctx.state();
-    let catlist = Arc::new(CustomCatalogProviderList::new());
+    let cataloglist = 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(catlist.clone());
+    ctx.register_catalog_list(cataloglist.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 = catlist.catalogs.read().unwrap();
+        let catalogs = cataloglist.catalogs.read().unwrap();
         assert!(catalogs.contains_key("dircat"));
     };
 
@@ -143,8 +143,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 listdir = std::fs::read_dir(dir).unwrap();
-        for res in listdir {
+        let direntries = std::fs::read_dir(dir).unwrap();
+        for res in direntries {
             let entry = res.unwrap();
             let filename = entry.file_name().to_str().unwrap().to_string();
             if !filename.ends_with(ext) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to