Skip to content

Fix malformed boxed output in function docs examples - #109965

Merged
alexey-milovidov merged 9 commits into
ClickHouse:masterfrom
cadarso77:fix-issue-109849-polygons-doc-example
Jul 14, 2026
Merged

alexey-milovidov merged 9 commits into
ClickHouse:masterfrom
cadarso77:fix-issue-109849-polygons-doc-example

Conversation

@cadarso77

@cadarso77 cadarso77 commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes: #109849

Adjust malformed boxed output in embedded FunctionDocumentation examples under src/Functions. This fixes the original polygonsIntersectCartesian and polygonsIntersectSpherical examples and applies the same box-width correction to other affected examples with the same formatting problem.

Changelog category (leave one):

  • Documentation

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

Fixed malformed boxed output formatting in embedded function documentation examples.

Version info

  • Merged into: 26.7.1.961 (included in 26.7 and later)

@CLAassistant

CLAassistant commented Jul 10, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@PedroTadim PedroTadim added the can be tested Allows running workflows for external contributors label Jul 10, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [093b8a2]

Summary: ✅


AI Review

Summary

This PR fixes the malformed boxed output in the touched embedded function documentation examples. I rechecked the current head against the prior review threads and did not find any remaining box-width or indentation regressions in the src/Functions / src/AggregateFunctions surface this PR claims to clean up. I resolved the stale uniqCombined formatting thread; the separate toDateTime32 documentation mismatch discussed earlier remains out of scope for this formatting-only PR, so I am not carrying it forward as a blocker here.

Final Verdict

Status: ✅ Approve
Minimum required actions: None.

@clickhouse-gh clickhouse-gh Bot added the pr-documentation Documentation PRs for the specific code PR label Jul 10, 2026
Comment thread src/Functions/polygonsIntersect.cpp Resolved
@cadarso77

cadarso77 commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor Author

I took a quick look at the unrelated integration test failure reported in CI.

It appears to be coming from test_replicated_table_structure_alter in tests/integration/test_replicated_database/test.py:

def test_replicated_table_structure_alter(started_cluster):
main_node.query("DROP DATABASE IF EXISTS table_structure SYNC")
dummy_node.query("DROP DATABASE IF EXISTS table_structure SYNC")
competing_node.query("DROP DATABASE IF EXISTS table_structure SYNC")
main_node.query(
"CREATE DATABASE table_structure ENGINE = Replicated('/clickhouse/databases/table_structure', 'shard1', 'replica1');"
)
dummy_node.query(
"CREATE DATABASE table_structure ENGINE = Replicated('/clickhouse/databases/table_structure', 'shard1', 'replica2');"
)
competing_node.query(
"CREATE DATABASE table_structure ENGINE = Replicated('/clickhouse/databases/table_structure', 'shard1', 'replica3');"
)
competing_node.query("CREATE TABLE table_structure.mem (n int) ENGINE=Memory")
dummy_node.query("DETACH DATABASE table_structure")
settings = {"distributed_ddl_task_timeout": 0}
main_node.query(
"CREATE TABLE table_structure.rmt (n int, v UInt64) ENGINE=ReplicatedReplacingMergeTree(v) ORDER BY n",
settings=settings,
)
competing_node.query("SYSTEM SYNC DATABASE REPLICA table_structure")
competing_node.query("DETACH DATABASE table_structure")
main_node.query(
"ALTER TABLE table_structure.rmt ADD COLUMN m int", settings=settings
)
main_node.query(
"ALTER TABLE table_structure.rmt COMMENT COLUMN v 'version'", settings=settings
)
main_node.query("INSERT INTO table_structure.rmt VALUES (1, 2, 3)")
metadata_path = competing_node.query(
"SELECT metadata_path FROM system.tables WHERE database='table_structure' AND name='mem'"
).strip()
db_disk_name = get_database_disk_name(competing_node)
competing_node.exec_in_container(
[
"/usr/bin/clickhouse",
"disks",
"-C",
"/etc/clickhouse-server/config.xml",
"--disk",
f"{db_disk_name}",
"--save-logs",
"--query",
f"remove {metadata_path}",
],
user="root",
)
competing_node.restart_clickhouse(kill=True)
dummy_node.query("ATTACH DATABASE table_structure")
dummy_node.query("SYSTEM SYNC DATABASE REPLICA table_structure")
dummy_node.query("SYSTEM SYNC REPLICA table_structure.rmt")
assert "1\t2\t3\n" == dummy_node.query("SELECT * FROM table_structure.rmt")
competing_node.query("SYSTEM SYNC DATABASE REPLICA table_structure")
competing_node.query("SYSTEM SYNC REPLICA table_structure.rmt")
# time.sleep(600)
assert "mem" in competing_node.query("SHOW TABLES FROM table_structure")
assert "1\t2\t3\n" == competing_node.query("SELECT * FROM table_structure.rmt")
main_node.query("ALTER TABLE table_structure.rmt ADD COLUMN k int")
main_node.query("INSERT INTO table_structure.rmt VALUES (1, 2, 3, 4)")
dummy_node.query("SYSTEM SYNC DATABASE REPLICA table_structure")
dummy_node.query("SYSTEM SYNC REPLICA table_structure.rmt")
assert "1\t2\t3\t0\n1\t2\t3\t4\n" == dummy_node.query(
"SELECT * FROM table_structure.rmt ORDER BY k"
)

In this test, metadata_path is queried from system.tables on competing_node after DETACH DATABASE table_structure. If that query returns an empty string once the detached database is no longer visible there, the later remove {metadata_path} command might explain the observed failure: Mandatory argument 'path' is missing.

This looks unrelated to the documentation-only changes in this PR. If this diagnosis seems right, I can open a separate PR with a minimal test-only fix.

@alexey-milovidov alexey-milovidov left a comment

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.

Thank you! LGTM.

@alexey-milovidov alexey-milovidov self-assigned this Jul 10, 2026
@alexey-milovidov

Copy link
Copy Markdown
Member

Confirmed: the only failing check, test_replicated_database/test.py::test_replicated_table_structure_alter, is unrelated to this documentation-only change. It is a mass regression on master that started today (51 failures across 37 PRs on 2026-07-10), tracked in #110036, and a fix is already in progress in #110030. This PR is otherwise green and approved, so it can be merged once that fix lands on master (or on a CI retry).

Comment thread src/Functions/polygonsIntersect.cpp Resolved
@cadarso77
cadarso77 force-pushed the fix-issue-109849-polygons-doc-example branch from 0ac1257 to 51efa01 Compare July 14, 2026 10:13
@clickhouse-gh

clickhouse-gh Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 48.00% 85.80% +37.80%
Functions 60.50% 92.60% +32.10%
Branches 36.80% 78.00% +41.20%

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

Full report · Diff report

@alexey-milovidov
alexey-milovidov merged commit 71dd09b into ClickHouse:master Jul 14, 2026
174 of 175 checks passed
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 15, 2026
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…polygons-doc-example

Fix malformed boxed output in function docs examples
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 pr-documentation Documentation PRs for the specific code PR 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.

This page has bad formatting of the example, fix it

5 participants