Fix ClickHouse cluster CTAS execution - #5978
Conversation
|
Thanks for this. The two-step flow is the right fix, and matching the Cloud path is the correct approach. A few things before merge:
This is a silent, non-opt-in behavior change for all cluster users, so please call it out in the PR description. Any project with
Migration gap An engine-adapter change doesn't refingerprint models, so existing tables keep their duplicated data until each model is next rebuilt. Users get a mix of corrected and still-inflated tables with nothing forcing reconciliation. Please document that affected models need a restatement to pick up the fix. Docs Add a note to Tests The new test only covers default
|
|
Also, should fix #6008 |
Description
Fix ClickHouse CTAS behavior in cluster mode.
Cluster CTAS now follows the same two-step flow as ClickHouse Cloud:
EMPTYandON CLUSTER.INSERT ... SELECT.This prevents
ON CLUSTER ... AS SELECTfrom executing the source query on every cluster node and duplicating data. A regression test covers the generated cluster-mode SQL.Test Plan
.venv/bin/python -m pytest tests/core/engine_adapter/test_clickhouse.py -q— 35 passed.Checklist
make styleand fixed any issuesmake fast-test)git commit -s) per the [DCO](DCO)