Skip to content

docs(formats): document JSONEachRowWithProgress stream object kinds - #111707

Merged
Blargian merged 2 commits into
ClickHouse:masterfrom
Bartok9:sera/docs-json-each-row-with-progress-objects
Oct 3, 2026
Merged

Blargian merged 2 commits into
ClickHouse:masterfrom
Bartok9:sera/docs-json-each-row-with-progress-objects

Conversation

@Bartok9

@Bartok9 Bartok9 commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Changelog entry

N/A — documentation only.

Summary

Document every top-level stream object that JSONEachRowWithProgress emits (meta, row, progress, totals/min/max, limit counters, top-level exception). Expand the example to include the leading meta line and a separate exception sample. Keep JSONStringsEachRowWithProgress factory docs aligned.

Closes #83493.

Matched docs table keys against JSONEachRowWithProgressRowOutputFormat methods. No behavior change.

AI-assisted; human-reviewed.


Workflow [PR]
Sync PR [sync-upstream/pr/111707]

Version info

  • Merged into: 26.10.1.1399-master (included in 26.10 and later)

@Bartok9

Bartok9 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Merged current master into this branch to clear the conflict.

Resolution notes:

  • Kept the stream-object docs (meta/row/progress/totals/extremes/limit counters + top-level exception) in both docs/en and the embedded Documentation{...} blocks.
  • Preserved the post-master absolute link style in the C++ embedded docs: /reference/formats/JSON/JSONEachRow (and sibling), instead of the older relative ./…md form that drifted on this tip.
  • Docs markdown still uses the same-directory relative links under docs/en/interfaces/formats/JSON/.

No product/format behavior change — documentation-only. Happy to adjust wording if reviewers prefer a shorter table.

@Bartok9
Bartok9 force-pushed the sera/docs-json-each-row-with-progress-objects branch from 806c8b7 to 8472627 Compare July 27, 2026 16:54
@vdimir vdimir added the can be tested Allows running workflows for external contributors label Jul 28, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [b7f21ff]

Summary: ✅


AI Review

Summary

This PR updates the embedded FormatFactory::setDocumentation text for the JSONEachRowWithProgress / JSONStringsEachRowWithProgress and JSONCompactEachRowWithProgress / JSONCompactStringsEachRowWithProgress formats so the documented stream objects match the actual formatter behavior. On the current tip, the previously open JSONEachRowWithProgress example mismatch is fixed, and I do not see any remaining correctness or documentation-contract issues.

Final Verdict

✅ No new findings from this review. The current diff looks ready from the AI-review side.

LLVM Coverage Report

Measured on commit b7f21ff.

Metric Baseline Current Δ
Lines 88.10% 88.10% +0.00%
Functions 91.70% 91.70% +0.00%
Branches 79.50% 79.50% +0.00%

Changed lines: Changed C/C++ lines covered: 68/68 (100.00%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jul 28, 2026
@Bartok9

Bartok9 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Thanks — both points fixed in the latest commit:

  1. rows_before_aggregation: reworded to describe the real trigger (query performs aggregation with the rows_before_aggregation counter enabled), rather than an "aggregation limit". Applied in both the markdown page and the embedded setDocumentation copy so they stay in sync.
  2. JSONStringsEachRowWithProgress.md: updated to the current contract — added the leading meta object, string-serialized row values, and a note that it shares the same top-level object kinds as JSONEachRowWithProgress.

Documentation-only, no format behavior change.

@Bartok9

Bartok9 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up: fixed JSONStringsEachRowWithProgress.md so Array (and other complex) field values match yield_strings — e.g. "arr":"[0,1]" as one JSON string, not a nested string array. Clarified the description line the same way. Embedded FormatFactory example was already correct.

@Bartok9

Bartok9 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Both AI-review majors addressed in the latest commit:

  1. meta ordering — reworded to "once, before the first row" and added a note that a progress object may arrive before meta (progress reporting starts before the result prefix is written), matching 03272_json_with_progress.reference.
  2. exception is conditional — clarified it is emitted on the HTTP path only when http_write_exception_in_output_format=1, not unconditionally. Applied to both JSONEachRowWithProgress and the embedded setDocumentation copy so they stay in sync.

@Bartok9

Bartok9 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

recheck

Docs-only PR; single remaining red check was Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 storage, parallel) on sha e1f4ed7 — re-running to clear likely flaky. Prior bot majors already addressed; thanks @vdimir for the approve.

@Bartok9

Bartok9 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

The one red check — Integration tests (amd_asan_ubsan, db disk, old analyzer, 1/6) — is the unrelated flaky test_storage_nats/test_system_stop.py::test_jetstream_failed_insert_does_not_lose_messages (NATS JetStream), not touched by this docs-only change. Everything else (builds, stateless, unit, style, docs check, Code Review) is green and @vdimir approved. Safe to re-run that shard / merge whenever convenient — happy to rebase if it drifts.

@Bartok9

Bartok9 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the open Code Review note on rows_before_limit_at_least.

  • Docs table + embedded setDocumentation now match JSON.md: the object is emitted when the query contains LIMIT, and is a lower estimate of rows there would have been without LIMIT — not proof that rows were dropped.
  • Tip: d12d90b05e60 → 0f82a3b367e6

Unrelated CI noise left hanging from the previous tip (docs/format wording only; no query-pipeline/product change):

No further product change planned for those.

@Bartok9

Bartok9 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

recheck

@Bartok9

Bartok9 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

recheck

Docs-only PR (@vdimir APPROVED). Remaining red is ambient Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 storage, parallel) on tip 0f82a3b367e6:

Product wording already landed; no tip change this turn — re-running to clear the flaky arm.

@vdimir
vdimir enabled auto-merge July 29, 2026 17:26
@Bartok9

Bartok9 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

recheck

Docs-only; @vdimir APPROVED. Remaining red still ambient Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 storage, parallel) (Server died / ParallelReplicas unknown-stream — upstream #110518). No tip change.

@Bartok9

Bartok9 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

recheck

@Bartok9

Bartok9 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

recheck

Docs-only; @vdimir APPROVED. Residual red: Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 storage, parallel) infra flake (see upstream ParallelReplicas noise). Prior recheck 00:49Z did not enqueue a new workflow; retrying.

@Bartok9

Bartok9 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

recheck

Docs-only; @vdimir APPROVED. Residual red: Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 storage, parallel) (#110518 / infra class) — unrelated to JSONEachRowWithProgress docs.

@Bartok9

Bartok9 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current master to clear stale CI (docs-only PR; prior red was Stateless amd_llvm_coverage ParallelReplicas). No content change.

auto-merge was automatically disabled July 30, 2026 17:13

Head branch was pushed to by a user without write access

@Bartok9
Bartok9 force-pushed the sera/docs-json-each-row-with-progress-objects branch from 0f82a3b to b0740c6 Compare July 30, 2026 17:13
@Bartok9

Bartok9 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

recheck

Docs-only JSONEachRowWithProgress. Fresh run draining; residual red AST fuzzer (amd_msan) looks ambient (docs touch only). @vdimir already APPROVED — clearing CI noise.

@Bartok9

Bartok9 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

recheck

Docs-only. Residual AST fuzzer (amd_msan) looks ambient/unrelated; @vdimir already APPROVED.

Bartok9 pushed a commit to Bartok9/ClickHouse that referenced this pull request Jul 31, 2026
Address open Code Review on ClickHouse#111707: JSONCompactEachRowWithProgress and
JSONCompactStringsEachRowWithProgress share writesProgressConcurrently /
finalizeImpl with JSONEachRowWithProgress, but docs still described the
pre-stream-object shape (metadata always first; omitted limit counters /
exception path).

- docs/en + embedded setDocumentation for both Compact formats
- note array payloads for row/totals/min/max
- cross-link Compact siblings from JSONEachRowWithProgress

Signed-off-by: Bartok9 <[email protected]>
@Bartok9

Bartok9 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Addressed Code Review on tip ded6f2c:

  1. Docs check (Mintlify) — dropped direct edits to the four autogenerated *WithProgress.mdx pages (restored to master). Source of truth remains FormatFactory::setDocumentation in the WithProgress format cpp files.
  2. JSONStringsEachRowWithProgress setDocumentation — added complex-value-as-string clarification + explicit pointer to the progress-before-meta / HTTP-only exception caveats so autogen will not regress.

Docs-only; no format behavior change. @vdimir’s prior APPROVED still covers the original scope.

@clickhouse-gh

clickhouse-gh Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing b7f21ff38 with master 782be4dce (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

8 translation units recompiled, 10 s compile time in total, 8 of them have a recent master baseline.

Job report

@Bartok9

Bartok9 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Re: refreshed AI Review on tip ded6f2c (⚠️ Request changes — Mintlify *WithProgress.mdx still stale).

Why the checked-in .mdx pages are intentionally unchanged on this tip

An earlier tip edited those four pages directly and failed Docs check (Mintlify) with Direct edits inside AUTOGENERATED regions detected. Per that guard + the inline review on the same tip, those files are produced from system.formats.description via generate-formats.sql / the autogenerated-docs path — they are not hand-edited in ordinary PRs.

What this PR does land as source of truth

  • FormatFactory::setDocumentation for JSONEachRowWithProgress, JSONStringsEachRowWithProgress, and the Compact siblings (stream-object table, progress may precede meta, rows_before_limit_at_least lower-estimate semantics, HTTP-only exception with http_write_exception_in_output_format=1, compact array-shaped payloads, Strings complex-value-as-one-JSON-string).
  • Legacy docs/en/... pages where still present in tree history were aligned earlier; current tip keeps the C++ description blocks as the Mintlify feed.

On pr-autogenerated-docs

Refreshing the four generated pages needs a binary built from this tip so system.formats.description reflects the new text, then the supported autogen flow. I do not have a green path to commit regenerated AUTOGENERATED regions from outside that workflow without re-tripping the protected-region check. Happy for a maintainer to run pr-autogenerated-docs / docs autogen against this tip (or post-merge nightly) so the site copy picks up the same contract — or to point me at the exact contributor-facing command/label you want on this PR and I will follow it.

Docs-only; no format behavior change. @vdimir already APPROVED the original scope. CI on ded6f2c is nearly green (a few long arms still draining).

@vdimir

vdimir commented Aug 10, 2026

Copy link
Copy Markdown
Member

@Bartok9 could you sign the CLA and change commit email name to link to your account? #111707 (comment)

@Bartok9

Bartok9 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@vdimir Thanks — on it.

Commit author linkage

  • Latest tip commits (c0a20a84f2, ded6f2cee4) are already under GitHub user Bartok9 with [email protected].
  • Older commits on the branch still show a stale noreply id / mismatched login from an earlier push path. I will rewrite the PR tip so all commits on this branch use Bartok9 + that noreply email (docs-only history; no content change) and force-push with lease once that is done.

CLA

If anything still looks unsigned after the rewrite + CLA sign, please ping and I will fix immediately.

@Bartok9
Bartok9 force-pushed the sera/docs-json-each-row-with-progress-objects branch from ded6f2c to 4777f9b Compare August 10, 2026 09:05
@Bartok9

Bartok9 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@vdimir Done on tip 4777f9bdcc3.

Commit authorship

  • Squashed/rebased the PR onto current master as a single commit.
  • Author + committer are Bartok9 / [email protected] (the noreply id linked to this account).
  • Dropped the older tip commits that used the stale 178742249+Bartok9@… noreply id (those were what made CLA assistant report “Bartok9 seems not to be a GitHub user”).

CLA

  • Please hit the CLA assistant recheck if it still shows pending — signing is against the linked Bartok9 identity above.
  • Content is still docs-only (FormatFactory::setDocumentation for the *WithProgress JSON formats); Mintlify .mdx left to the autogenerated-docs path.

Thanks for the ping.

@Bartok9

Bartok9 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

recheck

Docs-only tip 4777f9bdcc3 (single commit, author/committer Bartok9 / [email protected]). @vdimir APPROVED earlier; CLA assistant previously reported all committers signed — please recheck CLA if the badge is stale after the squash.

Residual red on this tip looks ambient, unrelated to format docs:

  • Stress test (amd_debug) / Stress test (arm_release) — Hung check failed
  • Mergeable Check fails only on those two

Builds, style, Code Review, integration/stateless arms otherwise green. No product change.

@Bartok9
Bartok9 force-pushed the sera/docs-json-each-row-with-progress-objects branch from 39de800 to 3454f8b Compare August 14, 2026 05:14
@Bartok9

Bartok9 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the fresh Code Review note on tip 3454f8b → e06b7e33478.

JSONStringsEachRowWithProgress embedded setDocumentation example was still showing native JSONEachRowWithProgress values. Updated to stringified fields + leading meta, aligned with 01446_json_strings_each_row.reference / yield_strings.

Docs-only; no format behavior change.

@Bartok9

Bartok9 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

recheck

Docs-only tip e06b7e33478 (@vdimir APPROVED earlier). Fresh residual red: Stress test (arm_tsan) — ambient Logical error: Coordinator for parallel reading from replicas is not initialized (STID: 6383-451e), unrelated to JSONEachRowWithProgress docs. No tip change.

@Bartok9

Bartok9 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

recheck

Docs-only; @vdimir APPROVED. Tip e06b7e33478 already fixes the latest Code Review note (JSONStringsEachRowWithProgress setDocumentation example now stringifies scalars/complex values). Residual red: Stress test (arm_tsan) ambient Logical error on parallel replicas coordinator — unrelated to format docs. Other arms green / draining.

@Bartok9

Bartok9 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

recheck

Docs-only; @vdimir APPROVED. Tip e06b7e33478 already addresses the latest Code Review note (stringified JSONStringsEachRowWithProgress example). Residual red: Stress test (arm_tsan) ambient ParallelReplicas coordinator logical error — unrelated to format docs.

@clickhouse-gh clickhouse-gh Bot added the comp-formats Input/output formats (CSV/JSON/Parquet/ORC/Arrow/Protobuf/etc.). label Sep 4, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Dear @vdimir, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself.

Document stream object kinds for JSONEachRowWithProgressRowOutputFormat
and JSONCompactEachRowWithProgressRowOutputFormat.

Closes: ClickHouse#83493

Agent-Owner: sera
Signed-off-by: Bartok9 <[email protected]>
@Bartok9
Bartok9 force-pushed the sera/docs-json-each-row-with-progress-objects branch from e06b7e3 to 3fede62 Compare September 12, 2026 00:07
…hProgress example

The setDocumentation example started at row, contradicting the stream-object
table that meta is emitted before the first row. Add the leading meta line and
a short separate HTTP exception snippet so system.formats.description stays
consistent.
@Bartok9

Bartok9 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

@Blargian Addressed the open note on the JSONEachRowWithProgress example (tip b7f21ff38b9).

  • Example now starts with the leading meta line, so the next system.formats.description refresh will not publish a row-first stream.
  • Short separate snippet shows the HTTP exception object (http_write_exception_in_output_format=1 only, not nested under row).

Docs-only; no format behavior change.

@Bartok9

Bartok9 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

@Blargian Already on tip b7f21ff (that review thread is resolved against the old line).

setDocumentation for JSONEachRowWithProgress now starts the example with a leading meta line, then row / progress. The HTTP exception path is a short separate example in the same section: top-level {"exception":"..."}, not nested under row, only when http_write_exception_in_output_format=1.

Docs-only; no format behavior change. Happy to adjust wording if you still want something different on this tip.

@Blargian
Blargian added this pull request to the merge queue Oct 3, 2026
Merged via the queue into ClickHouse:master with commit 88f07b8 Oct 3, 2026
149 checks passed
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-formats Input/output formats (CSV/JSON/Parquet/ORC/Arrow/Protobuf/etc.). manual approve Manual approve required to run CI pr-not-for-changelog This PR should not be mentioned in the changelog 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.

JSONEachRowWithProgress output format documentation is incomplete

5 participants