You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(precompute): value_column ignored at ingest - COUNT(DISTINCT col) estimates cardinality of the wrong column #432
SELECT srcip, COUNT(DISTINCT dstip)
FROM netflow_table
GROUP BY srcip;
the planner, inference configuration, and streaming configuration are all generated correctly:
Aggregation type: HLL
Grouping keys: [srcip]
value_column: dstip
However, the ingest → precompute path never reads AggregationConfig.value_column. Instead, it always feeds the scalar value that arrived on the wire (the dataset's configured value column, e.g. pkt_len) into the accumulator.
As a result, ASAP computes:
COUNT(DISTINCT pkt_len) GROUP BY srcip
while ClickHouse correctly computes:
COUNT(DISTINCT dstip) GROUP BY srcip
The two systems are answering different queries, making fidelity and benchmark comparisons invalid.
Root Cause
Although value_column is propagated correctly through planning and configuration, it is never used during ingest or precomputation.
JSON Ingest
json_ingest.rs reads only JsonFileIngestConfig.value_col (the dataset default value column).
Remote Write Ingest
Remote-write ingestion forwards the Prometheus sample value directly:
Sample.value
Routing
ingest_source.rs forwards:
(labels, ts, s.value)
for every aggregation and performs no per-aggregation value_column resolution.
Worker Execution
worker.rs::apply_sample() hashes the supplied value into the accumulator and never consults config.value_column:
Activity
milindsrivastava1997 commentedon Jun 23, 2026
FYI @zzylol