ClickHouse / ClickHouse/clickhousectl

`print_human` drops empty arrays and empty strings that JSON shows; local tables leave blank cells instead of `-`

Open
#850 0 comments 0 reactions 0 assignees View on GitHub
bug cloud local
Dominant language
Rust
Stars
74
Forks
5
Avg merge
2d 11h
Merged PRs (30d)
196

Description

## Validated scope and current-PR plan — 2026-09-11

This section records the QA review and the current decision to finalize existing PRs without opening new PRs. It supersedes the proposed routing/fix suggestions in the original report below; the original observations are retained. Central plan: #757.

### Work for the existing PRs

Implementation status: the checked sub-items below are implemented on the existing PR branches and validated locally on combined head `82b374816a917cbac3a68194659beaaa5c7c9087`. Required final-head Cloud CI and merging remain pending; this issue stays open. See #757 for the combined validation and CI status.

- [x] #811 — Render present empty arrays and empty strings explicitly in the shared human renderer; preserve absent-field handling and PEM summaries.

### Remaining scope

Blank cells in local server tables bypass the shared cloud renderer and remain deferred.

This is a partial assignment. Keep the issue open after these PRs land; use sub-item references rather than a whole-issue closing keyword.

### Validation and corrections

Confirmed empty strings/arrays are explicitly filtered by [output.rs:193](https://github.com/ClickHouse/clickhousectl/blob/d2c37f814fff53fe68d636e34103e2d0550bf84d/crates/clickhousectl/src/cloud/output.rs#L193). Render present empty values distinctly while preserving absent-field behavior and PEM summaries. Local table blank cells bypass this renderer, so they do not automatically belong in #811. Also resolves #844 item 6 and #837’s empty-array-only human result.

---

## Original QA report

Found in the 2026-09-11 QA sweep of the combined PR stack at [`d2c37f81`](https://github.com/ClickHouse/clickhousectl/commit/d2c37f814fff53fe68d636e34103e2d0550bf84d), top PR #823, installed release build (package version still 0.4.2). Reproduced behaviour only; no implementation included.

Severity: low-medium; cross-cutting absence convention.

AGENTS.md: render absence as `-`/`ABSENT`. #806 made `print_human` show empty *objects* (`settings: {}`), but empty arrays and empty strings are still omitted, so the human view cannot distinguish "empty" from "field not present":

| field | `--json` | human |
|---|---|---|
| `service get` `tags`, `privateEndpointIds`, `availablePrivateEndpointIds` | `[]` | absent |
| `clickpipe get` `fieldMappings`, `destination.columns`, `tableDefinition.sortingKey` | `[]` | absent |
| `clickpipe get` `destination.table`, `source.postgres.settings.replicationSlotName` | `""` | absent |
| `clickpipe get` `settings` | `{}` | `settings: {}` |

Reading a CDC pipe in human mode you cannot see the destination table field at all.

Local: `local server list` human table leaves PID/Version/ports blank for a stopped server and HTTP Port blank for Postgres rows, instead of `-`; a blank cell reads as a rendering glitch when ClickHouse and Postgres rows are mixed.

Suggested: render `[]` and `""` explicitly (like `{}`), and `-` in `tabled` cells.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with crates/clickhousectl/src/cloud/output.rs around line 193 and review existing PR #811 and combined validation in #757; the payload says the shared renderer work is already implemented. Local server table blank cells are explicitly deferred, so check the referenced PR and issue plan before doing any work.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.