jerry-024 commented on code in PR #747:
URL: https://github.com/apache/paimon-rust/pull/747#discussion_r3870085871


##########
crates/integrations/datafusion/src/catalog.rs:
##########
@@ -683,13 +735,20 @@ impl SchemaProvider for PaimonSchemaProvider {
                     paimon::spec::CoreOptions::new(&session_options)
                         .ensure_engine_can_serve(&identifier.full_name())
                         .map_err(to_datafusion_error)?;
-                    let resolver = table_engines.get(&declared).ok_or_else(|| {
-                        plan_datafusion_err!(
-                            "no table engine is registered for '{}' tables 
('{}')",
+                    let Some(resolver) = table_engines.get(&declared) else {

Review Comment:
   <!-- dlf-review -->
   **[MAJOR] Metadata-only fallback is blocked by read-option validation**
   
   `ensure_engine_can_serve` runs before the missing-resolver branch. Because 
DataFusion loads every catalog table when planning 
`information_schema.columns`, an unrelated external table with no registered 
engine can be rejected by time-travel or incremental-scan options before 
`UnavailableEngineTableProvider` exposes its schema. This makes a metadata 
query for another valid table fail during planning.
   
   Could we move the missing-resolver metadata-provider branch before 
read-specific session-option validation and keep validation on the 
registered-engine path? Actual reads and writes remain rejected by the 
unavailable provider.
   



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