Skip to content

Backport #119873 to 26.7: Combine small blocks into one Arrow IPC record batch on output - #120427

Merged
PedroTadim merged 1 commit into
26.7from
backport/26.7/119873
Sep 17, 2026
Merged

PedroTadim merged 1 commit into
26.7from
backport/26.7/119873

Conversation

@robot-ch-test-poll3

@robot-ch-test-poll3 robot-ch-test-poll3 commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #119873
Cherry-pick pull-request #120397

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

Version info

  • Merged into: 26.7.11.7

@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-backport Changes, backported to release branch. Do not use manually - automated use only! label Sep 16, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [5299294]

Summary: ❌

job_name test_name status info comment
Integration tests (amd_asan_ubsan, db disk, old analyzer, 2/8) FAIL
test_storage_nats/test_nats_jetstream_credentials_rotation.py::test_jetstream_unacked_messages_survive_rotation FAIL cidb
Integration tests (amd_asan_ubsan, db disk, old analyzer, 8/8) ERROR
Integration tests (amd_tsan, 2/6) ERROR

@groeneai

Copy link
Copy Markdown
Collaborator

The two new settings are missing from the Arrow documentation tables on 26.7

On this line those tables live in ArrowBlockInputFormat.cpp, not in ArrowIPC/ArrowIPCBlockInputFormat.cpp where master keeps them, so the two documentation rows of #119873 did not travel with the cherry-pick: the file contains no output_format_arrow_record_batch_size here, while the 26.8 backport (#120428) carries the rows in its ArrowIPC file.

Effect: on a 26.7 server built from this branch, SELECT description FROM system.formats WHERE name IN ('Arrow', 'ArrowStream') documents the other nine output_format_arrow_* settings but not the two the native writer now honours by default. No check compares those tables against the settings, so CI stays green either way.

The four rows below close it, two per table, after the output_format_arrow_low_cardinality_as_dictionary row (:453 and :589). Each states that the setting reaches the native writer only, the way the neighbouring output_format_arrow_unsupported_types_as_binary row states its scope: with output_format_arrow_use_native_writer = 0 the library writer ignores both settings, which I measured on this line as 64 record batches instead of 1. I built the branch with them (clang-21, as ci/defs/defs.py pins here) and 05211_arrow_output_record_batch_coalescing, 02995_new_settings_history and 02326_settings_changes_system_table pass, with both settings then present in system.formats.

The four rows

In the Arrow table:

| `output_format_arrow_record_batch_size`                                                                                  | Target rows per record batch when combining small blocks. Buffering can increase memory use and delay the first batch until the query finishes. `0` disables the row target. Applies to the native writer only. | `0`          |
| `output_format_arrow_record_batch_size_bytes`                                                                            | Target bytes of accumulated block data per record batch. Buffering can increase memory use and delay the first batch until the query finishes. `0` disables the byte target. Applies to the native writer only. | `0`          |

In the ArrowStream table:

| `output_format_arrow_record_batch_size`                                      | Target rows per record batch when combining small blocks. Buffering can increase memory use and delay the first batch until the query finishes. `0` disables the row target. Applies to the native writer only. | `0`         |
| `output_format_arrow_record_batch_size_bytes`                                | Target bytes of accumulated block data per record batch. Buffering can increase memory use and delay the first batch until the query finishes. `0` disables the byte target. Applies to the native writer only. | `0`         |

Fine by me to leave the cherry-pick minimal if you would rather keep it identical to what merged.

@PedroTadim
PedroTadim merged commit eef6354 into 26.7 Sep 17, 2026
37 of 44 checks passed
@PedroTadim
PedroTadim deleted the backport/26.7/119873 branch September 17, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants