Weijun-H commented on code in PR #6536: URL: https://github.com/apache/arrow-datafusion/pull/6536#discussion_r1215502322
########## datafusion/core/src/catalog/information_schema.rs: ########## @@ -81,15 +81,17 @@ impl InformationSchemaConfig { for schema_name in catalog.schema_names() { if schema_name != INFORMATION_SCHEMA { - let schema = catalog.schema(&schema_name).unwrap(); - for table_name in schema.table_names() { - let table = schema.table(&table_name).await.unwrap(); - builder.add_table( - &catalog_name, - &schema_name, - &table_name, - table.table_type(), - ); + // schema name may not exist in the catalog, so we need to check + if let Some(schema) = catalog.schema(&schema_name) { + for table_name in schema.table_names() { + let table = schema.table(&table_name).await.unwrap(); + builder.add_table( Review Comment: Yes, it makes sense -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org