vkverma9534 opened a new issue, #20113: URL: https://github.com/apache/datafusion/issues/20113
### Describe the bug location : listing_table_factory.rs, inside ListingTableFactory::create I might be mistaken, but I noticed that state is downcast to SessionState using downcast_ref::<SessionState>().unwrap(). Since create accepts a &dyn Session, this seems to assume that the concrete type is always SessionState. If that assumption doesn’t hold (for example with alternative or wrapped Session implementations), this would cause a panic rather than returning an error. I’m not sure if this is an intentional invariant or just a temporary implementation detail (there’s a TODO nearby that suggests it may not be final). If this is not intentional, I’m happy to open a PR to handle this more defensively and return a proper error instead. ### To Reproduce _No response_ ### Expected behavior _No response_ ### Additional context _No response_ -- 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]
