The query engine and SQL parser support COUNT(DISTINCT col) (normalized to CARDINALITY) with AggregationType::HLL precompute, but asap-planner fails when generating inference_config.yaml / streaming_config.yaml for these queries.
Current State
asap-planner-rs/src/planner/sql.rs — get_sql_statistics() only maps: QUANTILE, SUM, COUNT, AVG, MIN, MAX
It does not map CARDINALITY.
Gaps
map_statistic_to_precompute_operator() — no Statistic::Cardinality → HLL
build_sketch_parameters() — no HLL / precision parameter path
SketchParameterOverrides — no HLL block in planner input YAML (optional)
- For
COUNT(DISTINCT dstip) GROUP BY srcip , the distinct column must be the sketch’s value column, not a rollup label—so the planner should put only srcip in grouping and leave rollup empty, instead of treating every non – GROUP BY metadata field (dstip, proto, etc.) as rollup dimensions.
The query engine and SQL parser support COUNT(DISTINCT col) (normalized to CARDINALITY) with
AggregationType::HLLprecompute, but asap-planner fails when generating inference_config.yaml / streaming_config.yaml for these queries.Current State
asap-planner-rs/src/planner/sql.rs—get_sql_statistics()only maps:QUANTILE, SUM, COUNT, AVG, MIN, MAXIt does not map
CARDINALITY.Gaps
map_statistic_to_precompute_operator()— noStatistic::Cardinality→ HLLbuild_sketch_parameters()— no HLL / precision parameter pathSketchParameterOverrides— no HLL block in planner input YAML (optional)COUNT(DISTINCT dstip) GROUP BY srcip, the distinct column must be the sketch’s value column, not a rollup label—so the planner should put only srcip in grouping and leave rollup empty, instead of treating every non – GROUP BY metadata field (dstip, proto, etc.) as rollup dimensions.