Repository navigation
Conversation
The adaptive footer read (`clamp(file_size / 100, 128 KiB, 2 MiB)`, backported from 115686) saves a round trip on object storage, but for a local file a second read is cheap and the larger tail only costs bytes on every open. `Prefetcher` now records `ReadBufferFromFileBase::isRegularLocalFile`, and `Reader::readFileMetaData` reads 64 KiB when `input_format_parquet_footer_read_size` is 0 and the file is a regular local file. Other sources and an explicit non-zero setting are unchanged. Cherry-picked from 5a58f22; the setting description and the test follow the 26.8 layout (`05385_parquet_footer_read_size`). ClickHouse#124883 Related: ClickHouse#124673 Related: #2181
ianton-ru
marked this pull request as draft
November 23, 2026 16:06
…m master. The setting description of `input_format_parquet_footer_read_size` now says the 64 KiB tail applies when the file is read directly from the local filesystem (the reader's buffer reports `isRegularLocalFile`). Reads through a file descriptor or a wrapping buffer keep the adaptive size. The `SettingsChangesHistory` reason no longer says that `0` keeps the adaptive behavior. Cherry-picked from 6fbb4e7; on 26.8 the history reason is in `SettingsChangesHistory.cpp`, so it is changed there. ClickHouse#124883 Related: #2181
Draft
9 of 30 tasks
This was referenced Nov 26, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of ClickHouse#124883 to
antalya-26.8. It is a prerequisite for the Parquet footer-size hint and the reuse of the footer tail, which are split out of #2181 into a separate pull request that goes on top of this one.antalya-26.8already reads a footer tail sized to the file (1%, clamped to[128 KiB, 2 MiB]), from the backport of ClickHouse#115686. That saves a round trip on object storage. For a local file a second read is cheap, and the larger tail only costs bytes on every open.With this change
PrefetcherrecordsReadBufferFromFileBase::isRegularLocalFile, andReader::readFileMetaDatareads a 64 KiB tail wheninput_format_parquet_footer_read_sizeis 0 and the file is a regular local file. Object storage, URL and HDFS reads, and an explicit non-zero setting, are unchanged. Upstream measuredSELECT count()over 100 ClickBench Parquet files at 6.55 MB of footer tails instead of 140.7 MB.It is a cherry-pick of two commits of that pull request:
5a58f229ecb0(the change and the test) and6fbb4e7e880b(the precise wording of the setting description and of the history reason). Compared with upstream, the history row ofinput_format_parquet_footer_read_sizeis inSettingsChangesHistory.cppon 26.8 instead of inline inFormatFactorySettings.h, so the reason text is changed there, and the test is the 26.805385_parquet_footer_read_sizeinstead of05025_....Tests:
05385_parquet_footer_read_sizenow checks that a default read of a local file reads the same number of bytes (65536) as an explicitinput_format_parquet_footer_read_size = 65536. It fails on the base binary (131072for the default) and passes with the change. All 204 stateless tests withparquetin the name pass, as do03999_stateless_settings_history,02326_settings_changes_system_tableand04652_system_documentation_settings_historyafter the second commit. This was run in the Praktika functional job on a local aarch64 build; PR CI has not run yet.Related: ClickHouse#124883
Related: #2181
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Reading Parquet files from the local filesystem fetches a 64 KiB footer tail by default instead of a tail sized to the file, which cuts the bytes read when opening many files.
Documentation entry for user-facing changes
The description of
input_format_parquet_footer_read_sizenow states the default for local files.CI/CD Options
Exclude tests:
Regression jobs to run: