gratus00 commented on code in PR #27644:
URL: https://github.com/apache/datafusion/pull/27644#discussion_r4714821754


##########
datafusion/core/src/execution/session_state.rs:
##########
@@ -438,7 +438,7 @@ impl SessionState {
         }
 
         let catalog = self.resolve_catalog(catalog_name)?;
-        let Some(schema) = catalog.schema(&resolved_ref.schema) else {
+        let Some(schema) = catalog.schema(&resolved_ref.schema)? else {

Review Comment:
   Added a `try_schema_for_ref` helper that returns `Ok(None)` or `Err` 
depending on missing catalogue or provider failures. `statement_to_plan` now 
uses that instead of `if let Ok(...)`. This way genuine misses still reach the 
planner's "table not found" error. `schema_for_ref` keeps its existing errors 
and provider errors are returned
   
   Added tests in `datafusion/core/tests/catalog/failing_provider.rs` as well 
for behavior documentation 



-- 
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]


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

Reply via email to