alamb commented on code in PR #19388:
URL: https://github.com/apache/datafusion/pull/19388#discussion_r2656365595


##########
docs/source/user-guide/cli/functions.md:
##########
@@ -170,5 +170,43 @@ The columns of the returned table are:
 | table_size_bytes      | Utf8      | Size of the table, in bytes              
                                    |
 | statistics_size_bytes | UInt64    | Size of the cached statistics in memory  
                                    |
 
+## `list_files_cache`
+
+The `list_files_cache` function shows information about the `ListFilesCache` 
that is used by the [`ListingTable`] implementation in DataFusion. When 
creating a [`ListingTable`], DataFusion lists the files in the table's location 
and caches results in the `ListFilesCache`. Subsequent queries against the same 
table can reuse this cached information instead of re-listing the files.
+
+You can inspect the cache by querying the `list_files_cache` function. For 
example,
+
+```sql
+> select split_part(path, '/', -1) as folder, metadata_size_bytes, expires_in, 
unnest(metadata_list)['file_size_bytes'] as file_size_bytes, 
unnest(metadata_list)['e_tag'] as e_tag from list_files_cache();

Review Comment:
   this is very cool



-- 
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]

Reply via email to