Skip to content

feat(asap-planner) : support SQL COUNT(DISTINCT) -> HLL streaming/inference config generation #384

@akanksha-akkihal

Description

@akanksha-akkihal

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions