Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ce9c58d
Parquet v3: align coalesced reads to a fixed byte grid
ianton-ru Nov 30, 2026
44e2c3d
Parquet v3 read alignment: decide cuts per adjacent pair of ranges
ianton-ru Dec 2, 2026
f63af37
Parquet v3 read alignment: test that coalesced tasks do not straddle …
ianton-ru Dec 2, 2026
6620e5d
Parquet v3 read alignment: check the boundary only for ranges that wo…
ianton-ru Dec 2, 2026
08498eb
Parquet v3 read alignment: make the cut decision independent of the r…
ianton-ru Dec 2, 2026
246d751
Parquet v3 read alignment: describe the minimum segment guard accurately
ianton-ru Dec 2, 2026
ca7be26
Parquet v3 read alignment: do not let a zero-length range hide a boun…
ianton-ru Dec 2, 2026
0def54c
Parquet v3 read alignment: compare window indexes instead of computin…
ianton-ru Dec 2, 2026
b816d0c
Parquet v3 read alignment: merge the straddle test into 05819_parquet…
ianton-ru Dec 2, 2026
6d08994
Parquet v3 read alignment: say that only the merging of ranges is lim…
ianton-ru Dec 2, 2026
5bfe618
Check the anti-fragmentation guard at every boundary the merge newly …
ianton-ru Dec 3, 2026
9e79207
Parquet v3 read alignment: keep cutting where a range crosses the bou…
ianton-ru Dec 3, 2026
605b98b
Parquet v3 read alignment: measure the anti-fragmentation guard on th…
ianton-ru Dec 3, 2026
9240144
Parquet v3 read alignment: say which limits of a task depend on the r…
ianton-ru Dec 3, 2026
2bf4dee
Parquet v3: stop the alignment piece walk at ranges that are not read…
ianton-ru Dec 3, 2026
9fdb951
Parquet v3: document that a minimum larger than the alignment stride …
ianton-ru Dec 3, 2026
4706cf6
Parquet v3 read alignment: do not recurse exponentially over ranges t…
ianton-ru Dec 3, 2026
ee50303
Parquet v3: keep the logger of `Prefetcher` in a member
ianton-ru Dec 3, 2026
97974a2
Parquet v3: measure the fragment actually left by the alignment cut
ianton-ru Dec 3, 2026
76d3c40
Parquet v3 read alignment: keep the comment of `shouldCutForAlignment…
ianton-ru Dec 3, 2026
a1e1e27
Merge branch 'antalya-26.8' into feature/antalya-26.8/parquet-align-r…
ianton-ru Dec 3, 2026
dcffe27
Parquet v3 read alignment: apply the size limit of a read task in the…
ianton-ru Dec 3, 2026
680af41
Parquet v3 read alignment: scan right past cancelled ranges correctly…
ianton-ru Dec 3, 2026
4dbf8f6
Parquet v3 read alignment: test that the scan to the right goes past …
ianton-ru Dec 3, 2026
495f31b
Parquet v3 read alignment: measure the initial range of a split read …
ianton-ru Dec 3, 2026
7694a69
Parquet v3 read alignment: bound the walk to the left for the cut dec…
ianton-ru Dec 4, 2026
df8cc9d
Parquet v3 read alignment: do not stop cutting on a fixed count of wa…
ianton-ru Dec 4, 2026
e03b1ac
Parquet v3 read alignment: describe `ParquetPrefetcherAlignmentWalkLi…
ianton-ru Dec 4, 2026
f251247
Parquet v3 read alignment: document the work limit of the cut decisions
ianton-ru Dec 4, 2026
d9f0c76
Merge branch 'antalya-26.8' into feature/antalya-26.8/parquet-align-r…
ianton-ru Dec 4, 2026
67498bd
Parquet v3 read alignment: stop the walk at a cancelled range that th…
ianton-ru Dec 4, 2026
00eb949
Parquet v3 read alignment: find the crossing of a split subrange that…
ianton-ru Dec 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Common/ProfileEvents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1853,6 +1853,9 @@ The server successfully detected this situation and will download merged part fr
M(ParquetPrefetcherReadRandomRead, "The total number of reads with ReadMode::RandomRead by DB::Parquet::Prefetcher", ValueType::Number) \
M(ParquetPrefetcherReadSeekAndRead, "The total number of reads with ReadMode::SeekAndRead by DB::Parquet::Prefetcher", ValueType::Number) \
M(ParquetPrefetcherReadEntireFile, "The total number of read with ReadMode::EntireFileIsInMemory by DB::Parquet::Prefetcher", ValueType::Number) \
M(ParquetPrefetcherPartAlignedTasks, "The number of read tasks whose coalescing was cut at a read alignment boundary (input_format_parquet_read_alignment_bytes) by DB::Parquet::Prefetcher", ValueType::Number) \
M(ParquetPrefetcherAlignmentWalkLimited, "The number of read tasks in which DB::Parquet::Prefetcher stopped cutting at read alignment boundaries, because the walk over the neighbouring ranges reached its limit on the number of steps or on the depth of the nested decisions (ranges that overlap a lot). It is counted once per task", ValueType::Number) \
M(ParquetPrefetcherAlignmentSkippedSmall, "The number of read tasks in which DB::Parquet::Prefetcher did not cut at a read alignment boundary because the part before the boundary of the run of neighbouring ranges that the cut would leave would be smaller than input_format_parquet_read_alignment_min_bytes (anti-fragmentation)", ValueType::Number) \
M(ParquetRowsFilterExpression, "The total number of rows that were passed through filter", ValueType::Number) \
M(ParquetColumnsFilterExpression, "The total number of columns that were passed through filter", ValueType::Number) \
M(FilterTransformPassedRows, "Number of rows that passed the filter in the query", ValueType::Number) \
Expand Down
6 changes: 6 additions & 0 deletions src/Core/FormatFactorySettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@ When reading GeoParquet files, skip whole row groups and, together with `input_f
)", 0) \
DECLARE(Bool, input_format_parquet_use_offset_index, true, R"(
Minor tweak to how pages are read from parquet file when no page filtering is used.
)", 0) \
DECLARE(UInt64, input_format_parquet_read_alignment_bytes, 0, R"(
Experimental. When the Parquet v3 reader merges neighbouring requested ranges (for example column chunks) into one read, do not merge across a multiple of this size. Set it to the writer's multipart part size (for example 10Mi for delta-rs, 64Mi for Spark/S3A) to avoid merged reads that span two parts of a multipart-uploaded object. Only the merging is limited: a single requested range that crosses a multiple of this size is still read as one request, and `input_format_parquet_read_alignment_min_bytes` can allow a merged read to cross it too. In a file whose ranges overlap so much that deciding the cuts would take more than a bounded amount of work, the reads of the task are left merged, and the profile event `ParquetPrefetcherAlignmentWalkLimited` counts such tasks. 0 disables.
)", 0) \
DECLARE(UInt64, input_format_parquet_read_alignment_min_bytes, 1048576, R"(
Experimental. Anti-fragmentation guard for `input_format_parquet_read_alignment_bytes`: do not cut a merge at a boundary when the part before the boundary of the run of neighbouring ranges that the cut would leave is smaller than this many bytes. The read then straddles the boundary instead of emitting a tiny extra request. The part is measured within one multiple of `input_format_parquet_read_alignment_bytes`, and it cannot be longer than the length of the range before the boundary plus four times the minimum seek distance of the reader (`input_format_parquet_local_file_min_bytes_for_seek` for local files, `remote_read_min_bytes_for_seek` for remote reads), because a read task takes only the ranges that start within that distance of the range that starts it. So if this value is larger than `input_format_parquet_read_alignment_bytes`, or than that bound for a boundary, no merge is cut at that boundary. 0 disables the guard. Default 1 MiB.
)", 0) \
DECLARE(Bool, input_format_parquet_verify_checksums, true, R"(
Verify page checksums when reading parquet files.
Expand Down
2 changes: 2 additions & 0 deletions src/Core/SettingsChangesHistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ const VersionToSettingsChangesMap & getSettingsChangesHistory()
{"allow_aggregate_function_states_in_open_formats", false, false, "New setting allowing aggregate function states in Parquet files and Iceberg tables. With it disabled, the ClickHouse types recorded in them are not applied, a state column reads as `String`, and writing a state throws `SUPPORT_IS_DISABLED`."},
{"export_merge_tree_part_check_destination_schema_staleness_ms", 0, 5000, "New setting: how stale the latest Iceberg destination metadata version may be when each part export task checks that the destination schema and partition spec did not change since the export was scheduled."},
{"export_merge_tree_part_allow_lossy_cast", false, false, "The setting is obsolete. `EXPORT PART` and `EXPORT PARTITION` cast values the way `INSERT ... SELECT` does."},
{"input_format_parquet_read_alignment_bytes", 0, 0, "New experimental setting: do not merge neighbouring Parquet read ranges across a multiple of this size (for example the writer's multipart part size). 0 disables."},
{"input_format_parquet_read_alignment_min_bytes", 1048576, 1048576, "New experimental setting: anti-fragmentation guard for Parquet read alignment - do not cut a merge at a boundary when the part before the boundary of the run of neighbouring ranges that the cut would leave is smaller than this. Default 1 MiB."},
});
addSettingsChanges(settings_changes_history, "26.8.35.20001.altinityantalya",
{
Expand Down
2 changes: 2 additions & 0 deletions src/Formats/FormatFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ FormatSettings getFormatSettings(const ContextPtr & context, const Settings & se
format_settings.parquet.page_filter_push_down = settings[Setting::input_format_parquet_page_filter_push_down];
format_settings.parquet.spatial_filter_push_down = settings[Setting::input_format_parquet_spatial_filter_push_down];
format_settings.parquet.use_offset_index = settings[Setting::input_format_parquet_use_offset_index];
format_settings.parquet.read_alignment_bytes = settings[Setting::input_format_parquet_read_alignment_bytes];
format_settings.parquet.read_alignment_min_bytes = settings[Setting::input_format_parquet_read_alignment_min_bytes];

format_settings.parquet.enable_json_parsing = settings[Setting::input_format_parquet_enable_json_parsing];
format_settings.parquet.memory_low_watermark = settings[Setting::input_format_parquet_memory_low_watermark];
Expand Down
2 changes: 2 additions & 0 deletions src/Formats/FormatSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ struct FormatSettings
size_t footer_read_size = 0;
bool page_filter_push_down = true;
bool use_offset_index = true;
UInt64 read_alignment_bytes = 0;
UInt64 read_alignment_min_bytes = 1048576;

bool enable_json_parsing = true;
bool preserve_order = false;
Expand Down
Loading
Loading