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::().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.