• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / etl / 26146978700
73%

Build:
DEFAULT BRANCH: main
Ran 20 May 2026 07:18AM UTC
Jobs 1
Files 188
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 May 2026 07:03AM UTC coverage: 74.567% (+0.3%) from 74.275%
26146978700

push

github

web-flow
Add ClickHouse ReplacingMergeTree support (#750)

* feat(clickhouse): thread engine through destination config

Adds `ClickHouseEngine` (`merge_tree` | `replacing_merge_tree`) in
`etl-config::shared`, defaulting to `ReplacingMergeTree`. Wires the
field through `DestinationConfig::ClickHouse`,
`DestinationConfigWithoutSecrets::ClickHouse`,
`ClickHouseInserterConfig`, and the replicator init path.

No behavioral change: the destination still emits `MergeTree` DDL.
Subsequent commits will branch DDL, encoding, and validation on the
engine.

* feat(clickhouse): RMT DDL builders and `__current` view

Adds `create_replacing_merge_tree_sql` (PK-required, ordered by
`primary_key_ordinal_position`, trailing `_etl_lsn` + `_etl_deleted`)
and `create_current_view_sql` (FINAL + tombstone filter, exposes only
user columns). Renames `build_create_table_sql` to
`create_merge_tree_sql` and adds a `create_table_sql` dispatcher.

Wires `create_table_with_metadata` and `recover_applying_metadata`
through the dispatcher and emits the companion view under RMT.
`expected_clickhouse_column_names` is now engine-aware via
`trailing_cdc_column_names`.

Adds `DdlKind::CreateView` for telemetry. No row-encoding changes yet;
RMT tables cannot be written end-to-end until the next commit.

* ref(clickhouse): polish RMT DDL helpers from review

- Rename `issue_create_table_ddl` to `issue_create_table_stmt`.
- Reword CDC/etl column constant doc-comments to lead with the engine.
- Simplify `expected_clickhouse_column_names` to use a chained iterator.
- Add blank lines around the early-return and final `Ok(format!)` in
  `create_replacing_merge_tree_sql`.

* feat(clickhouse): RMT encoder and validation

Row encoding now branches on engine via `append_cdc_columns`:
- MergeTree (unchanged): `cdc_operation` + `cdc_lsn` (commit_lsn).
- ReplacingMergeTree: `_etl_lsn` (start_lsn, the RMT version) + `_etl_deleted`
  tombstone. `start_lsn` is globally monotonic, so multi-event same-commit
  tra... (continued)

645 of 682 new or added lines in 10 files covered. (94.57%)

49 existing lines in 5 files now uncovered.

31290 of 41962 relevant lines covered (74.57%)

905.86 hits per line

Uncovered Changes

Lines Coverage ∆ File
12
96.74
-2.98% crates/etl-destinations/src/clickhouse/client.rs
10
88.06
0.98% crates/etl-destinations/src/clickhouse/core.rs
7
86.75
-0.94% crates/etl-destinations/src/clickhouse/test_utils.rs
3
94.09
0.62% crates/etl-api/src/configs/destination.rs
3
0.0
0.0% crates/etl-replicator/src/core.rs
2
59.76
5.59% crates/etl-config/src/shared/destination.rs

Coverage Regressions

Lines Coverage ∆ File
21
88.06
0.98% crates/etl-destinations/src/clickhouse/core.rs
21
77.34
-0.89% crates/etl/src/replication/apply.rs
5
84.54
-2.42% crates/etl/src/test_utils/test_destination_wrapper.rs
1
94.09
0.62% crates/etl-api/src/configs/destination.rs
1
89.81
0.07% crates/etl-destinations/src/clickhouse/encoding.rs
Jobs
ID Job ID Ran Files Coverage
1 26146978700.1 20 May 2026 07:18AM UTC 188
74.57
GitHub Action Run
Source Files on build 26146978700
  • Tree
  • List 188
  • Changed 18
  • Source Changed 11
  • Coverage Changed 17
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26146978700
  • c52f219a on github
  • Prev Build on main (#26145070168)
  • Next Build on main (#26157719098)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc