avantgardnerio commented on code in PR #4112:
URL: https://github.com/apache/arrow-datafusion/pull/4112#discussion_r1014448932


##########
datafusion-cli/src/main.rs:
##########
@@ -142,11 +163,20 @@ pub async fn main() -> Result<()> {
 }
 
 fn create_runtime_env() -> Result<RuntimeEnv> {
+    let mut table_factories: HashMap<String, Arc<dyn TableProviderFactory>> =
+        HashMap::new();
+    table_factories.insert("csv".to_string(), 
Arc::new(ListingTableFactory::new(FileType::CSV)));
+    table_factories.insert("parquet".to_string(), 
Arc::new(ListingTableFactory::new(FileType::PARQUET)));
+    table_factories.insert("avro".to_string(), 
Arc::new(ListingTableFactory::new(FileType::AVRO)));
+    table_factories.insert("json".to_string(), 
Arc::new(ListingTableFactory::new(FileType::JSON)));

Review Comment:
   @alamb this is getting closer to something I think you asked for earlier: 
treating `ListingTables` and custom tables the same way and just registering 
factories for table types.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to