ozankabak commented on PR #10650:
URL: https://github.com/apache/datafusion/pull/10650#issuecomment-2131118238

   Maybe I can help clarify things a little bit. The purpose of the PR is not 
to change the current fallback behavior, just simplify its implementation. 
AFAICT @berkaysynnada is moving the fallback logic to `TableProviderFactory`'s 
`create` (from `FileFormat`'s `create_physical_plan`), which enables him to 
simplify the rest of the code. I see that he implemented this for 
`ListingTableFactory`. The proto change is a consequence of the above -- it can 
be made independently AFAICT.
   
   The upside of the approach in this PR is that it simplifies the code across 
multiple files (e.g. proto), but the fallback behavior no longer becomes 
automatic for all custom table providers as far as I can tell -- @berkaysynnada 
 please correct me if I'm wrong.
   
   Maybe we can do the following: Instead of making every 
`TableProviderFactory` responsible for implementing this behavior in `create`, 
we can add some general mechanism at the trait level (maybe via a default 
method implementation?) to make this fallback automatic for all 
`TableProviderFactory` implementations unless overridden. @alamb, what do you 
think? Any ideas come to mind?


-- 
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...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to