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
feat: Expose cache hits in statistics_cache function (#23253)
## Which issue does this PR close?
- Closes None.
## Rationale for this change
Follow up to #22613. Cache hits
are now supported for all memory-limiting caches. Therefore it makes
sense to expose them in the `statistics_cache` function the same way the
`metadata_cache` function does it already.
## What changes are included in this PR?
- Add cache hits to the `statistics_cache` function
- Tests
- Adapt documentation for the `statistics_cache` function
## Are these changes tested?
Yes.
## Are there any user-facing changes?
Yes, the `statistics_cache` function supports now cache hits but no
breaking changes.
Copy file name to clipboardExpand all lines: datafusion-cli/src/main.rs
+40-9Lines changed: 40 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -711,17 +711,48 @@ mod tests {
711
711
.await?;
712
712
}
713
713
714
-
let sql = "SELECT split_part(path, '/', -1) as filename, table, file_size_bytes, num_rows, num_columns, table_size_bytes from statistics_cache() order by filename";
714
+
let sql = "SELECT split_part(path, '/', -1) as filename, table, file_size_bytes, num_rows, num_columns, hits, table_size_bytes from statistics_cache() order by filename";
ctx.sql("select * from lz4_raw_compressed_larger")
741
+
.await?
742
+
.collect()
743
+
.await?;
744
+
745
+
let sql = "SELECT split_part(path, '/', -1) as filename, table, file_size_bytes, num_rows, num_columns, hits, table_size_bytes from statistics_cache() order by filename";
0 commit comments