Skip to content

Add inline insert data mode for native protocol - #101034

Merged
alexey-milovidov merged 26 commits into
masterfrom
inline-insert-data
Apr 28, 2026
Merged

alexey-milovidov merged 26 commits into
masterfrom
inline-insert-data

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Mar 28, 2026 •

Copy link
Copy Markdown
Member

Add a setting send_table_structure_on_insert_with_inline_data and a --inline-insert-data command-line option for clickhouse-client to allow the server to parse inline INSERT data itself, avoiding the round-trip to send table structure back to the client.

This reuses the existing server-side inline data parsing machinery (used by the HTTP interface and async inserts) for the native TCP protocol, which improves performance for many small inserts.

Closes #91630

Changelog category (leave one):

  • New Feature

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Add setting send_table_structure_on_insert_with_inline_data and --inline-insert-data client option to allow the server to parse inline INSERT data itself over the native protocol, avoiding the round-trip to receive table structure and improving performance for many small inserts.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

New setting send_table_structure_on_insert_with_inline_data (Bool, default true): when disabled, the server will parse inline data in INSERT queries itself instead of sending table structure and column defaults back to the client.

New clickhouse-client option --inline-insert-data: sends INSERT data as is in the query text instead of converting it to blocks in the native format. Automatically sets send_table_structure_on_insert_with_inline_data = false.

Example:

clickhouse-client --inline-insert-data --query "INSERT INTO t VALUES (1, 'hello'), (2, 'world')"

Version info

  • Merged into: 26.5.1.144

…inline-insert-data` client option

Processing many small inserts over the native protocol is suboptimal because
the server replies with the table structure and column defaults for every query.

This adds:
- A setting `send_table_structure_on_insert_with_inline_data` (default true). When disabled,
  the server will parse inline data in INSERT queries itself instead of sending
  table structure back to the client.
- A `--inline-insert-data` command-line option for `clickhouse-client`. When set,
  the client sends the data as is in the INSERT query text instead of converting
  it to blocks in the native format, and routes the query through the ordinary
  query path (no round-trip for table structure).

The server already has the machinery to process inline INSERT data (used by the
HTTP interface and async inserts). This change reuses it for the native protocol.

#91630

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Mar 28, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [f9e42ee]

Summary: ✅


AI Review

Summary

This PR adds an inline insert-data mode for the native protocol in clickhouse-client via --inline-insert-data and send_table_structure_on_insert_with_inline_data, routes eligible inline INSERT queries through ordinary query execution so server-side parsing is used, adds coverage for the setting-driven path and mixed inline+external data rejection, and documents the new flag. I did not find additional blocker/major issues beyond the already addressed bot feedback.

ClickHouse Rules
Item Status Notes
Deletion logging ➖
Serialization versioning ➖
Core-area scrutiny ✅
No test removal ✅
Experimental gate ✅
No magic constants ✅
Backward compatibility ✅
SettingsChangesHistory.cpp ✅
PR metadata quality ✅
Safe rollout ✅
Compilation time ✅
No large/binary files ✅
Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-feature Pull request with new product feature label Mar 28, 2026
$CLICKHOUSE_CLIENT --inline-insert-data --query "INSERT INTO test_inline_insert FORMAT JSONEachRow {\"x\": 4, \"y\": \"bar\"}"

# Test with send_table_structure_on_insert_with_inline_data setting directly
$CLICKHOUSE_CLIENT --send_table_structure_on_insert_with_inline_data 0 --inline-insert-data --query "INSERT INTO test_inline_insert VALUES (5, 'baz')"

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.

This case is labeled as “setting directly”, but it still passes --inline-insert-data, so it doesn’t verify the setting-driven path by itself.

Please add a case that sets --send_table_structure_on_insert_with_inline_data 0 without --inline-insert-data to catch regressions where the setting is ignored.

Comment thread src/Core/Settings.cpp
Only has an effect in ClickHouse Cloud. Number of granules in stripe of compact part of MergeTree tables to use multibuffer reader, which supports parallel reading and prefetch. In case of reading from remote fs using of multibuffer reader increases number of read request.
)", 0) \
\
DECLARE(Bool, send_table_structure_on_insert_with_inline_data, true, R"(

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.

I can’t find any server-side read of send_table_structure_on_insert_with_inline_data in this PR (or in the repo), so this new setting appears to be a no-op right now.

That means users who set send_table_structure_on_insert_with_inline_data=0 without --inline-insert-data won’t get the advertised behavior change. Could you either wire this setting into the insert handshake path or defer exposing the setting until it is actually consumed?

alexey-milovidov and others added 8 commits March 28, 2026 23:46
…ent-side behavior

Address review feedback:
- Make `send_table_structure_on_insert_with_inline_data = 0` work without
  `--inline-insert-data` by checking the setting value in `ClientBase`
- Fix test to verify setting-only behavior (without `--inline-insert-data` flag)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…th_inline_data` setting without `--inline-insert-data` flag

Add test cases that use only the `send_table_structure_on_insert_with_inline_data`
setting (set to 0) without the `--inline-insert-data` CLI flag, testing JSONEachRow
and CSV formats. This verifies the setting-driven path works independently.

The setting is already wired client-side at `ClientBase.cpp` line 2382 where
`!client_context->getSettingsRef()[Setting::send_table_structure_on_insert_with_inline_data]`
is checked to enable inline data mode.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member Author

The Stress test (arm_msan) failure is fixed by #101239, which should be merged first. After it is merged, please update the branch to include the fix.

inline_insert_data = config().getBool("inline-insert-data", false);

if (inline_insert_data)
client_context->setSetting("send_table_structure_on_insert_with_inline_data", false);

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.

This introduces a new user-facing setting and CLI flag, but the PR template still has Documentation is written unchecked and no docs changes are included. For a New Feature, please add docs for both send_table_structure_on_insert_with_inline_data and --inline-insert-data (behavior, defaults, limitations, examples).

alexey-milovidov and others added 8 commits April 19, 2026 09:15
Address review: add documentation for the new `--inline-insert-data`
`clickhouse-client` command-line option in `docs/en/interfaces/client.md`.

The setting `send_table_structure_on_insert_with_inline_data` is already
documented inline via `DECLARE` in `src/Core/Settings.cpp`, which is the
authoritative source used to generate settings documentation.
…ttingsChangesHistory`

Master has bumped the version to 26.5; the test
`02995_new_settings_history` requires entries for newly added settings
to be in the 26.5 block (or later) since the baseline TSVs are
generated from `v26.4.1`.

CI report:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=101034&sha=c1f2cd42c5242d171cd4b8918e345f4911d0d856&name_0=PR&name_1=Fast%20test

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member Author

@groeneai, send a PR fixing this unit test failure.

@groeneai

Copy link
Copy Markdown
Collaborator

@alexey-milovidov, the unit test failure on this PR's CI (Unit tests (asan_ubsan, function_prop_fuzzer)) is a chronic trunk bug — not a regression from this PR. It hit on commit c1f2cd4 at line 79:21 of parseDateTimeBestEffort.cpp (signed integer overflow inside readDecimalNumber).

This bug is already being fixed by PR #102890 by @Avogar — approved by @nihalzp 8 days ago, awaiting merge.

CIDB confirms it's a chronic finding: 30+ unrelated PRs in the last 14 days plus 3 master hits, all firing at parseDateTimeBestEffort.cpp:79-82 (the four cases of the switch in readDecimalNumber).

Root cause: The outer while (!in.eof()) loop in parseDateTimeBestEffortImpl allows multiple . separators in the input. The fractional-parsing block at line 567 has no guard against re-entry, so on the second . it calls readDecimalNumber(fractional->value, num_digits, digits) again — but fractional->value is already populated (up to 10^18 - 1 after the cap to Int64::digits10). The macro's res *= common::exp10_i32(N) then overflows.

Reproduced locally on master HEAD with the test input from PR #102890:

$ build-asan/programs/clickhouse local --query \
    "SELECT parseDateTime64BestEffortOrNull('12:34:56.123456789012345678.987654321', 9)"
src/IO/parseDateTimeBestEffort.cpp:82:22: runtime error: signed integer overflow:
  123456789012345678 * 10000 cannot be represented in type 'long'

PR #102890 fixes this with a has_fractional_separator flag that rejects duplicate . separators with CANNOT_PARSE_DATETIME. Once it lands, the function_prop_fuzzer failure should disappear from this and other PRs.

I'll skip filing a duplicate PR. If you'd prefer a different approach (or want #102890 unblocked), let me know.

— Session: cron:clickhouse-ci-task-worker:20260425-181500

$CLICKHOUSE_CLIENT --inline-insert-data --query "INSERT INTO test_inline_insert FORMAT Values (3, 'foo')"
$CLICKHOUSE_CLIENT --inline-insert-data --query "INSERT INTO test_inline_insert FORMAT JSONEachRow {\"x\": 4, \"y\": \"bar\"}"

# Test with send_table_structure_on_insert_with_inline_data setting directly (without --inline-insert-data flag)

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.

⚠️ This test only covers successful inserts, but the PR also adds a new rejection path for mixed inlined+external data (Processing inline insert data with both inlined and external data ... is not supported).

Please add a negative case that pipes stdin into an inline-data insert (with --inline-insert-data and with --send_table_structure_on_insert_with_inline_data 0) and assert the new exception text, similar to 01501_clickhouse_client_INSERT_exception.sh. Without that, this guard can regress silently.

In `ClientBase::processParsedSingleQuery`, both `is_async_insert_with_inlined_data` and
`is_inline_insert_data` could be true at the same time. The async branch was checked first,
so when the user explicitly requested inline insert data mode (via `--inline-insert-data`
or `send_table_structure_on_insert_with_inline_data = 0`) while `async_insert` was enabled,
mixing inline data with stdin/`INFILE` produced the "async inserts" rejection message
instead of the "inline insert data" one.

This made `04064_inline_insert_data` flaky in the AsyncInsert CI shard, where the negative
cases grep for the inline-mode message but received the async-mode one.

Compute `is_inline_insert_data` first and clear `is_async_insert_with_inlined_data` when
it is set, so an explicit user choice for inline mode wins on the client side.

CI report: #101034
@clickhouse-gh

clickhouse-gh Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.00% 84.00% +0.00%
Functions 91.10% 91.10% +0.00%
Branches 76.50% 76.50% +0.00%

Changed lines: 93.10% (54/58) · Uncovered code

Full report · Diff report

@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Apr 28, 2026
@alexey-milovidov alexey-milovidov self-assigned this Apr 28, 2026
Merged via the queue into master with commit 1ae55b8 Apr 28, 2026
165 checks passed
@alexey-milovidov
alexey-milovidov deleted the inline-insert-data branch April 28, 2026 13:46
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Apr 28, 2026
$CLICKHOUSE_CLIENT --query "CREATE TABLE test_inline_insert (x UInt64, y String) ENGINE = MergeTree ORDER BY x"

# Test with --inline-insert-data flag
$CLICKHOUSE_CLIENT --inline-insert-data --query "INSERT INTO test_inline_insert VALUES (1, 'hello'), (2, 'world')"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@groeneai Could you add an INSERT SELECT query to test another corner case? Also, test with async_inserts disabled?

@PedroTadim

Copy link
Copy Markdown
Member

@groeneai can you randomize the new setting introduced in this PR?

groeneai added a commit to groeneai/ClickHouse that referenced this pull request May 12, 2026
Randomizing `send_table_structure_on_insert_with_inline_data` exposed five
stateless tests that depend on the legacy "client converts inline data to
native blocks" path. The randomization itself is correct and surfaces real
behavior differences in the new server-side parsing path (added in ClickHouse#101034);
the tests, however, were never written to cover that dimension.

Fixes applied per test:

* `04027_json_input_format` — change `-- { clientError 117 }` to `-- { error 117 }`
  (9 occurrences). The test verifies that ambiguous JSON column names are
  rejected. With the legacy path the client parses and reports the error;
  with the inline path the server parses and reports the same error. Both
  paths correctly detect the ambiguity, so accept the error from either side
  (this is a genuine improvement in test coverage, not a band-aid).

* `04045_values_insert_trailing_comment` — pin via `Random settings limits`
  comment. The inline path has a separate, pre-existing multi-query parsing
  issue: a trailing SQL comment after VALUES data inside a multi-query stream
  silently swallows subsequent queries. Keep this test focused on the
  trailing-comment behavior in the legacy path it was written for.

* `03229_async_insert_alter` — pin via `Random settings limits`. The test
  asserts `data_kind` in `system.asynchronous_insert_log`. The inline path
  bypasses async insert (`is_async_insert_with_inlined_data` becomes false
  in `ClientBase`), so log entries change from `Preprocessed` to `Parsed`.
  Pin the legacy path so the async-insert log assertions remain meaningful.

* `01173_transaction_control_queries` — pin via `Random settings limits`.
  The inline path triggers async insert which interacts badly with
  transactions (`Async inserts inside transactions are not supported`). The
  test is about transaction-control semantics, not about which side parses
  inline data; pin the legacy path so transactions remain testable here.

* `00753_system_columns_and_system_tables_long` — pin via `Random settings
  limits`. The inline path builds the in-memory block with a different
  layout, so `system.tables` reports different `total_bytes` for the
  `Memory` engine (e.g. 130 -> 256). Pin the legacy path; this test is
  about system-table reporting, not block layout.

The first fix is the right semantic answer (either side reporting the same
error is valid). The four pins are documented technical debt — each
behavior delta in the inline path is a candidate follow-up bug for the
team to triage. CI report:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104640
alexey-milovidov added a commit to groeneai/ClickHouse that referenced this pull request Jul 3, 2026
The randomizer added in this PR exercises `send_table_structure_on_insert_with_inline_data`
with both values. With `send_table_structure_on_insert_with_inline_data = 0` (server-parsed
inline path), `INSERT INTO TABLE FUNCTION ...` does not apply the column `DEFAULT` /
`input_format_null_as_default` for an explicit `NULL` (it becomes 0), so this test fails
(reproducible 51/51 in CI, passing 97/97 without the setting). A direct table `INSERT` is
unaffected. This contradicts the earlier assumption that the behavior was already correct.

Re-pin the test to `send_table_structure_on_insert_with_inline_data = (1, 1)` (the same
`Random settings limits` mechanism used by the other affected tests in this PR) so it keeps
testing the columns-description behavior it was written for, and track the real server-side
bug in ClickHouse#109253.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104640&sha=8ed06ca93081214a31acef155c8df020fd950600&name_0=PR&name_1=Stateless%20tests%20%28amd_tsan%2C%20parallel%2C%202%2F2%29
Related: ClickHouse#101034

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Jul 3, 2026
When the server parses INSERT ... VALUES inline data itself
(send_table_structure_on_insert_with_inline_data = 0), an explicit NULL
inserted into a non-Nullable column with a DEFAULT was not replaced by the
default for INSERT INTO TABLE FUNCTION remote()/file(), producing 0 instead
of the declared default. A plain table INSERT and the HTTP protocol apply it
correctly.

Root cause: getSourceFromInputFormat added AddingDefaultsTransform (which
applies input_format_null_as_default during parsing) only when
ast_insert_query->table_id was set. table_id is empty for table functions,
so the transform was skipped. The synchronous path is the affected one; the
asynchronous path adds its own AddingDefaultsTransform.

Fix: when table_id is empty, fall back to the resolved destination columns
saved in the context by InterpreterInsertQuery
(getInsertionTableColumnsDescription), which is populated for table functions
too. The input() path is unaffected (still gated by !input_function).

Related: ClickHouse#109253
Caused by: ClickHouse#101034

Co-Authored-By: Claude Opus 4.8 <[email protected]>
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Jul 3, 2026
When the server parses INSERT ... VALUES inline data itself
(send_table_structure_on_insert_with_inline_data = 0), an explicit NULL
inserted into a non-Nullable column with a DEFAULT was not replaced by the
default for INSERT INTO TABLE FUNCTION remote()/file(), producing 0 instead
of the declared default. A plain table INSERT and the HTTP protocol apply it
correctly.

Root cause: getSourceFromInputFormat added AddingDefaultsTransform (which
applies input_format_null_as_default during parsing) only when
ast_insert_query->table_id was set. table_id is empty for table functions,
so the transform was skipped. The synchronous path is the affected one; the
asynchronous path adds its own AddingDefaultsTransform.

Fix: when table_id is empty, fall back to the resolved destination columns
saved in the context by InterpreterInsertQuery
(getInsertionTableColumnsDescription), which is populated for table functions
too. The input() path is unaffected (still gated by !input_function).

Related: ClickHouse#109253
Caused by: ClickHouse#101034

Co-Authored-By: Claude Opus 4.8 <[email protected]>
pull Bot pushed a commit to sowelswl/ClickHouse that referenced this pull request Jul 11, 2026
…ndomize the setting

Follow-up to ClickHouse#101034. @PedroTadim asked to:
1. Add an INSERT SELECT corner case to `04064_inline_insert_data.sh`.
2. Add a case with `async_insert` disabled.
3. Randomize the new `send_table_structure_on_insert_with_inline_data` setting
   so CI exercises both the legacy and the new server-side parsing path.

Changes:

* `tests/queries/0_stateless/04064_inline_insert_data.sh` and `.reference`:
  - Two INSERT SELECT cases (with the `--inline-insert-data` flag and with
    `send_table_structure_on_insert_with_inline_data = 0`). INSERT SELECT
    queries do not have inline data, so the new inline path is bypassed via
    the `!insert->select` guard in `is_inline_insert_data`. The cases verify
    that requesting inline insert data mode does not break SELECT-driven
    INSERTs.
  - Two cases with `--async_insert 0` (one via the CLI flag, one via the
    setting). The user's explicit choice takes precedence over `async_insert`
    on the client side, so the data is parsed by the server inline regardless
    of the async insert toggle.

* `tests/clickhouse-test`:
  - Add `send_table_structure_on_insert_with_inline_data` to
    `SettingsRandomizer.settings` so CI exercises both the legacy "client
    converts inline data to native blocks" path and the new "server parses
    inline data" path.
pull Bot pushed a commit to sowelswl/ClickHouse that referenced this pull request Jul 11, 2026
…sert-data-tests-101034-followup

Extend 04064_inline_insert_data and randomize send_table_structure_on_insert_with_inline_data (follow-up to ClickHouse#101034)
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
When the server parses INSERT ... VALUES inline data itself
(send_table_structure_on_insert_with_inline_data = 0), an explicit NULL
inserted into a non-Nullable column with a DEFAULT was not replaced by the
default for INSERT INTO TABLE FUNCTION remote()/file(), producing 0 instead
of the declared default. A plain table INSERT and the HTTP protocol apply it
correctly.

Root cause: getSourceFromInputFormat added AddingDefaultsTransform (which
applies input_format_null_as_default during parsing) only when
ast_insert_query->table_id was set. table_id is empty for table functions,
so the transform was skipped. The synchronous path is the affected one; the
asynchronous path adds its own AddingDefaultsTransform.

Fix: when table_id is empty, fall back to the resolved destination columns
saved in the context by InterpreterInsertQuery
(getInsertionTableColumnsDescription), which is populated for table functions
too. The input() path is unaffected (still gated by !input_function).

Related: ClickHouse#109253
Caused by: ClickHouse#101034

Co-Authored-By: Claude Opus 4.8 <[email protected]>
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…ndomize the setting

Follow-up to ClickHouse#101034. @PedroTadim asked to:
1. Add an INSERT SELECT corner case to `04064_inline_insert_data.sh`.
2. Add a case with `async_insert` disabled.
3. Randomize the new `send_table_structure_on_insert_with_inline_data` setting
   so CI exercises both the legacy and the new server-side parsing path.

Changes:

* `tests/queries/0_stateless/04064_inline_insert_data.sh` and `.reference`:
  - Two INSERT SELECT cases (with the `--inline-insert-data` flag and with
    `send_table_structure_on_insert_with_inline_data = 0`). INSERT SELECT
    queries do not have inline data, so the new inline path is bypassed via
    the `!insert->select` guard in `is_inline_insert_data`. The cases verify
    that requesting inline insert data mode does not break SELECT-driven
    INSERTs.
  - Two cases with `--async_insert 0` (one via the CLI flag, one via the
    setting). The user's explicit choice takes precedence over `async_insert`
    on the client side, so the data is parsed by the server inline regardless
    of the async insert toggle.

* `tests/clickhouse-test`:
  - Add `send_table_structure_on_insert_with_inline_data` to
    `SettingsRandomizer.settings` so CI exercises both the legacy "client
    converts inline data to native blocks" path and the new "server parses
    inline data" path.
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
Randomizing `send_table_structure_on_insert_with_inline_data` exposed five
stateless tests that depend on the legacy "client converts inline data to
native blocks" path. The randomization itself is correct and surfaces real
behavior differences in the new server-side parsing path (added in ClickHouse#101034);
the tests, however, were never written to cover that dimension.

Fixes applied per test:

* `04027_json_input_format` — change `-- { clientError 117 }` to `-- { error 117 }`
  (9 occurrences). The test verifies that ambiguous JSON column names are
  rejected. With the legacy path the client parses and reports the error;
  with the inline path the server parses and reports the same error. Both
  paths correctly detect the ambiguity, so accept the error from either side
  (this is a genuine improvement in test coverage, not a band-aid).

* `04045_values_insert_trailing_comment` — pin via `Random settings limits`
  comment. The inline path has a separate, pre-existing multi-query parsing
  issue: a trailing SQL comment after VALUES data inside a multi-query stream
  silently swallows subsequent queries. Keep this test focused on the
  trailing-comment behavior in the legacy path it was written for.

* `03229_async_insert_alter` — pin via `Random settings limits`. The test
  asserts `data_kind` in `system.asynchronous_insert_log`. The inline path
  bypasses async insert (`is_async_insert_with_inlined_data` becomes false
  in `ClientBase`), so log entries change from `Preprocessed` to `Parsed`.
  Pin the legacy path so the async-insert log assertions remain meaningful.

* `01173_transaction_control_queries` — pin via `Random settings limits`.
  The inline path triggers async insert which interacts badly with
  transactions (`Async inserts inside transactions are not supported`). The
  test is about transaction-control semantics, not about which side parses
  inline data; pin the legacy path so transactions remain testable here.

* `00753_system_columns_and_system_tables_long` — pin via `Random settings
  limits`. The inline path builds the in-memory block with a different
  layout, so `system.tables` reports different `total_bytes` for the
  `Memory` engine (e.g. 130 -> 256). Pin the legacy path; this test is
  about system-table reporting, not block layout.

The first fix is the right semantic answer (either side reporting the same
error is valid). The four pins are documented technical debt — each
behavior delta in the inline path is a candidate follow-up bug for the
team to triage. CI report:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104640
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
The randomizer added in this PR exercises `send_table_structure_on_insert_with_inline_data`
with both values. With `send_table_structure_on_insert_with_inline_data = 0` (server-parsed
inline path), `INSERT INTO TABLE FUNCTION ...` does not apply the column `DEFAULT` /
`input_format_null_as_default` for an explicit `NULL` (it becomes 0), so this test fails
(reproducible 51/51 in CI, passing 97/97 without the setting). A direct table `INSERT` is
unaffected. This contradicts the earlier assumption that the behavior was already correct.

Re-pin the test to `send_table_structure_on_insert_with_inline_data = (1, 1)` (the same
`Random settings limits` mechanism used by the other affected tests in this PR) so it keeps
testing the columns-description behavior it was written for, and track the real server-side
bug in ClickHouse#109253.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104640&sha=8ed06ca93081214a31acef155c8df020fd950600&name_0=PR&name_1=Stateless%20tests%20%28amd_tsan%2C%20parallel%2C%202%2F2%29
Related: ClickHouse#101034

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…sert-data-tests-101034-followup

Extend 04064_inline_insert_data and randomize send_table_structure_on_insert_with_inline_data (follow-up to ClickHouse#101034)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-feature Pull request with new product feature pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server should not send the header and column defaults to the client if INSERT query contains inline data

4 participants