[Python] Add schema-aware Deduplicate transform to Beam YAML #41370
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.35) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 162 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.305
Real PR Conversation Timeline
1 comments
"Review active on #41370"
general
weight: 0.35
Mola-maker
Adds a
Deduplicatetransform to Beam YAML so pipelines can drop repeated deliveries by one or more fields without leaving YAML:Each Row is keyed by the given fields and passed through the existing
DeduplicatePerKey, sodurationandtime_domainmap straight onto its processing/event time durations. The key is a schema'd Row, which gives a deterministic RowCoder for the stateful step, and null key values work. The original Row is emitted unchanged, so the output keeps the input schema and timestamps.durationuses the same parsing asWindowInto(ms,s,m,h,d). LikeDeduplicatePerKey, records in different windows are not treated as duplicates.I also added
deduplicate_keptanddeduplicate_droppedcounters toDeduplicatePerKey. The YAML wrapper can't see dropped records, so the counters have to live there, and Python users ofDeduplicatePerKeyget them as well.Tests are in the new
yaml_deduplicate_test.py(single/composite/nullable keys, event time, schema and timestamps kept, separate windows, counters, config errors), plus atests/deduplicate.yamlintegration case. CHANGES.md is updated.Fixes #41354