You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improvements to list_files_cache table function (#19703)
## Which issue does this PR close?
- Follow on to #19616
## Rationale for this change
I had a few minor comments / suggestions while reviewing
#19616 from @jizezhang but they
weren't needed to do the initial merge, so I would like to propose them
in a follow up PR
## What changes are included in this PR?
1. Improve documentation
2. Improve handling of `table_ref` in ListingTableURL
3. use Null rather than `"NULL"` in `list_files_cache` table function
I can break this into separate PRs if that would help
## Are these changes tested?
Yes by CI
## Are there any user-facing changes?
The `list_files_cache` function now might return null
Copy file name to clipboardExpand all lines: datafusion-cli/src/functions.rs
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -703,10 +703,13 @@ impl TableFunctionImpl for StatisticsCacheFunc {
703
703
}
704
704
}
705
705
706
-
// Implementation of the `list_files_cache` table function in datafusion-cli.
706
+
/// Implementation of the `list_files_cache` table function in datafusion-cli.
707
+
///
708
+
/// This function returns the cached results of running a LIST command on a
709
+
/// particular object store path for a table. The object metadata is returned as
710
+
/// a List of Structs, with one Struct for each object. DataFusion uses these
711
+
/// cached results to plan queries against external tables.
707
712
///
708
-
/// This function returns the cached results of running a LIST command on a particular object store path for a table. The object metadata is returned as a List of Structs, with one Struct for each object.
709
-
/// DataFusion uses these cached results to plan queries against external tables.
710
713
/// # Schema
711
714
/// ```sql
712
715
/// > describe select * from list_files_cache();
@@ -788,7 +791,7 @@ impl TableFunctionImpl for ListFilesCacheFunc {
// expires field in ListFilesEntry has type Instant when set, from which we cannot get "the number of seconds", hence using Duration instead of Timestamp as data type.
@@ -821,7 +824,7 @@ impl TableFunctionImpl for ListFilesCacheFunc {
0 commit comments