Skip to content

feat: Expose cache hits in statistics_cache function - #23253

Merged
alamb merged 1 commit into
apache:mainfrom
mkleen:file-statistics-hits
Jul 1, 2026
Merged

alamb merged 1 commit into
apache:mainfrom
mkleen:file-statistics-hits

Conversation

@mkleen

@mkleen mkleen commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 30, 2026
@mkleen
mkleen marked this pull request as ready for review June 30, 2026 08:42

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @mkleen

+-----------------------------------+---------------------------+-----------------+--------------+-------------+------+------------------+
| filename | table | file_size_bytes | num_rows | num_columns | hits | table_size_bytes |
+-----------------------------------+---------------------------+-----------------+--------------+-------------+------+------------------+
| alltypes_plain.parquet | alltypes_plain | 1851 | Exact(8) | 11 | 3 | Absent |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@mkleen

mkleen commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@alamb Thanks for the review!

@alamb
alamb added this pull request to the merge queue Jul 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 1, 2026
@alamb
alamb added this pull request to the merge queue Jul 1, 2026
Merged via the queue into apache:main with commit 4d898e9 Jul 1, 2026
40 of 41 checks passed
mkleen added a commit to mkleen/datafusion that referenced this pull request Jul 13, 2026
## Which issue does this PR close?

- Closes None. 

## Rationale for this change

Follow up to apache#22613 and
apache#23253. Cache hits are now
supported for all memory-limiting caches. Therefore it makes sense to
expose them in the `list_files_cache` function the same way the
`metadata_cache` and `statistics_cache` functions do it already.

## What changes are included in this PR?

- Add cache hits to the `list_files_cache` function
- Tests
- Adapt documentation for the `list_files_cache` function

## Are these changes tested?

Yes.

## Are there any user-facing changes?

Yes, the `list_files_cache` function supports now cache hits but no
breaking changes.
@mkleen
mkleen deleted the file-statistics-hits branch July 19, 2026 19:56
kosiew pushed a commit to kosiew/datafusion that referenced this pull request Aug 12, 2026
## Which issue does this PR close?

- Closes None. 

## Rationale for this change

Follow up to apache#22613 and
apache#23253. Cache hits are now
supported for all memory-limiting caches. Therefore it makes sense to
expose them in the `list_files_cache` function the same way the
`metadata_cache` and `statistics_cache` functions do it already.

## What changes are included in this PR?

- Add cache hits to the `list_files_cache` function
- Tests
- Adapt documentation for the `list_files_cache` function

## Are these changes tested?

Yes.

## Are there any user-facing changes?

Yes, the `list_files_cache` function supports now cache hits but no
breaking changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation v55.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants