Add ClickHouse read/write nodes to the SQL graph - #79
Open
Marais wants to merge 1 commit into
Open
Conversation
Recognise the ClickHouse Spark connector in the query plan and give its
nodes first-class treatment in the DataFlint SQL view:
- Writes: an AppendData whose plan references ClickHouseWrite is renamed
"ClickHouse Write" and surfaces the connector's write metrics.
- Reads: a BatchScan backed by ClickHouseBatchScan is renamed
"ClickHouse Read". Previously these were misdetected as Iceberg reads,
since they look identical by node name; the scan class in the plan
description disambiguates them.
- The verbose per-batch write metrics are collapsed into compact
array-style rows so they fit on the node:
Batch Fill (0-25/25-50/50-75/75-100%): [a, b, c, d]
Batch Size (min/avg/max): [min, avg, max] (avg = rows / batch writes)
Batch Writes (ok/failed): [ok, failed]
- capitalizeWords now preserves mixed-case brand/acronym words, so node
names render as "ClickHouse"/"BigQuery"/"HDFS" instead of
"Clickhouse"/"Bigquery"/"Hdfs".
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Recognise the ClickHouse Spark connector in the query plan and give its nodes first-class treatment in the DataFlint SQL view.
Writes
An
AppendDatawhose plan referencesClickHouseWriteis renamed "ClickHouse Write" and surfaces the connector's write metrics. The verbose per-batch metrics are collapsed into compact array-style rows so they fit on the node:Batch Fill (0-25/25-50/50-75/75-100%)[1, 0, 0, 0]Batch Size (min/avg/max)[50, 50, 50]rows / batch writesBatch Writes (ok/failed)[1, 0]Reads
A
BatchScanbacked byClickHouseBatchScanis renamed "ClickHouse Read". These were previously misdetected as Iceberg reads — a ClickHouse read looks identical to an Iceberg scan by node name (BatchScan \db`.`table``); the scan class in the plan description is what disambiguates them.Casing fix
capitalizeWordsnow preserves mixed-case brand/acronym words, so node names render as ClickHouse / BigQuery / HDFS instead of the previous Clickhouse / Bigquery / Hdfs.How it's detected
Mirrors the existing Iceberg/BigQuery detection: match a marker string in the node's plan description (
ClickHouseWrite/ClickHouseBatchScan) and set a parsed-plan flag consumed bynodeEnrichedNameBuilder.Tests
spark-uiunit tests pass (104/104), including new cases for the write parser, the read scan parser, node naming, and metric filtering. Typecheck and production build are clean.🤖 Generated with Claude Code