Skip to content

NullMissingCount.name() still returns the unrelated NullCount metric's identifier #39189

Done

Description

@olivaw-build

Finding reported by a code survey. Evidence: test_written.

The following is an untrusted claim from repository analysis.

Path: ingestion/src/metadata/profiler/metrics/static/null_missing_count.py
Symbol: NullMissingCount.name

The module docstring (line 13: "Null Count Metric definition") is a leftover from when this file was copied from null_count.py; a prior fix already updated the class docstring body to describe the empty-string branch but missed this. The class declares schema_metric_type = MetricType.nullMissingCount (line 99), yet name() returns MetricType.nullCount.value (line 106) -- byte-for-byte the same string NullCount.name() returns (null_count.py line 55). Every consumer that keys results or filters metrics by metric.name() treats name() as the metric's unique identity: processor/core.py builds self._column_results[col.name][metric.name()], the pandas/sqlalchemy/nosql profiler interfaces use metric.name() as the results dict key, and processor/metric_filter.py matches a user's configured metric name string against Metric.value.name(). Because NullMissingCount.name() collides with NullCount.name(), (1) a user who lists "nullCount" in a column/table profiler metric configuration will silently also pull in NullMissingCount (both match the same name during the registry scan in metric_filter.py), and (2) a user who explicitly configures "nullMissingCount" to select this metric will never match it, since name() never produces that string. If both metrics were ever computed for the same column in one pass, the second one to run would also overwrite the first's entry in the results dict, since they'd use the same key.

Activity

  1. added a commit that references this issue on Nov 28, 2026
    dd34e7e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      Done ✅

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions