Skip to content

[DQ Threshold W2.7] tableCustomSQLQuery: accept thresholdUnit, apply operator to a percentage #33235

Description

@TeddyCr

tableCustomSQLQuery is the one definition that keeps its operator — a user-authored query can legitimately assert in either direction ("must return at least 1 row"). It gains only a unit.

Scope

  • ABSOLUTE (default, and today's meaning): evaluate_threshold(threshold, operator, len_rows) — unchanged.
  • PERCENTAGE: apply the same operator to len_rows / rowCount * 100 instead of the raw count.
  • Denominator must be computed when PERCENTAGE is set, regardless of computePassedFailedRowCount.
  • threshold and operator keep their stored values and meanings — no rename, no migration of existing test cases.

Acceptance

  • Existing test cases (no thresholdUnit) behave identically
  • operator: <= + PERCENTAGE + 1 fails when the query returns more than 1% of table rows
  • Every operator behaves correctly against a percentage

Depends on the row-tolerance sub-task.

Design spec: docs/plans/2026-09-11-dq-failure-thresholds.md. Parent epic: #16301.

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

  • Status
    Release Backlog 🚧

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions