Skip to content

Commit e5ed1fd

Browse files
aarthy-dkclaude
andcommitted
fix(profiling): prevent integer overflow in Invalid_Zip3_USA prevalence formula
The dq_score_prevalence_formula cast record_ct (BIGINT) to INT, overflowing on tables with more than 2.1B rows and aborting hygiene issue detection for the whole profiling run. Drop the cast so the numerator stays BIGINT, matching the other operand and the Column_Pattern_Mismatch formula. Reaches existing deployments via the static-metadata refresh on upgrade; no migration needed. TG-1120 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent c618241 commit e5ed1fd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

testgen/template/dbsetup_anomaly_types/profile_anomaly_types_Invalid_Zip3_USA.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ profile_anomaly_types:
1616
suggested_action: |-
1717
Review your source data, ingestion process, and any processing steps that update this column.
1818
dq_score_prevalence_formula: |-
19-
(NULLIF(p.record_ct, 0)::INT - NULLIF(SPLIT_PART(p.top_patterns, ' | ', 1), '')::BIGINT)::FLOAT/NULLIF(p.record_ct, 0)::FLOAT
19+
(NULLIF(p.record_ct, 0) - NULLIF(SPLIT_PART(p.top_patterns, ' | ', 1), '')::BIGINT)::FLOAT/NULLIF(p.record_ct, 0)::FLOAT
2020
dq_score_risk_factor: '1'
2121
dq_dimension: Validity
2222
impact_dimension: Conformance

0 commit comments

Comments
 (0)