Skip to content

Make planner sketch parameters explicit instead of silently using accuracy defaults #675

Description

@milindsrivastava1997

What happened

When sketch overrides are absent, the planner silently supplies hardcoded CMS, KLL, HLL, and HydraKLL parameters. Invalid top-k values are also parsed as floating-point values and cast to integers.

What I expected

The planner should either receive explicit sketch parameters or an explicitly selected named profile. Accidental omission, invalid dimensions, fractional top-k values, and out-of-range parameters should fail plan generation.

Steps to reproduce

  1. Generate a plan for an approximate aggregation without sketch overrides.
  2. Compare the emitted sketch parameters with a plan using explicit overrides.
  3. Supply an invalid or fractional top-k value and regenerate the plan.
  4. Observe that planning succeeds with implicit or coerced values.

Additional context

Defaults affect approximation error, memory usage, and runtime cost. Validate parameters at the planner boundary and include the resolved profile or parameters in plan diagnostics.

Concrete examples

A plan for an approximate aggregation is generated without sketch overrides:

requested aggregation: HLL
sketch overrides: absent
emitted precision: default value 14

If the omission was accidental, the plan still succeeds with a different accuracy and memory profile.

A malformed top-k value such as 2.7 should also be rejected. It should not be silently converted to an integer. The expected behavior is either an explicitly selected sketch profile or a plan-generation error.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions