alamb commented on issue #22553: URL: https://github.com/apache/datafusion/issues/22553#issuecomment-4557110959
Rather than a `loading` map, I think another way to handle this could be at a level higher --like maybe override the implementation of `FileFormat::infer_stats_and_ordering` (which is `async`) to track outstanding requests, and if there is an outstanding request return a future that resolves once the request has completed https://github.com/apache/datafusion/blob/03b390db7b5788476f9745eb9a4a4b5a873a4612/datafusion/datasource/src/file_format.rs#L138-L163 Otherwise I agree we need to make a `async` method on the `FileMetadataCache` trait itself, and what you have seems reasonable though it does seem a bit hard to use (as callers would have to pass in a async callback) -- 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]
