jizezhang commented on code in PR #19616:
URL: https://github.com/apache/datafusion/pull/19616#discussion_r2669002790
##########
datafusion/core/src/execution/context/mod.rs:
##########
@@ -1327,12 +1329,34 @@ impl SessionContext {
&& table_provider.table_type() == table_type
{
schema.deregister_table(&table)?;
+ if table_type == TableType::Base {
+ self.drop_list_files_cache_entries(&table_ref,
&table_provider);
Review Comment:
I moved the implementation to `DefaultListFilesCache`. One associated change
is that given only `TableReference` we would need to loop through all entries
in the cache to find those associated with the table, as opposed to getting the
list of table paths directly from a `ListingTable`. I thought about maintaining
an additional map from table ref to cache keys, but that seems to introduce a
bit too much complexity and not sure if necessary for this use case. But please
let me know if you have other suggestions. Thanks!
--
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]