Repository navigation
feat(api): Parquet export format for duplicate groups (#1252) - #1279
Merged
Merged
Conversation
format: parquet now exports duplicate groups, one row per group. The Arrow schema is declared from the typed PersonDuplicateGroup / AccountDuplicateGroup before the first page (DuplicateGroups::arrow_schema), so a nullable field that is null on every row of page one keeps its type when a later page sets it. Batches are built from the typed groups directly, never through their JSON: members is List<Struct<key, confidence>> (member_confidences folded into the list it is keyed by), the golden preview one `golden` struct. ExportRequest::from_params now refuses duplicates only as CSV. Co-Authored-By: Claude Opus 5.5 <[email protected]>
athvin
temporarily deployed
to
marketing-preview
November 26, 2026 21:53 — with
GitHub Actions
Inactive
athvin
added a commit
that referenced
this pull request
Nov 27, 2026
… epic and #1279's duplicates Parquet export (#1300) #1286 (248e296) was one commit, d245d4a. Its parent was a fresh main (8b5b25a), but 75 files in its tree were the versions from dc45fd1: a tree from an old worktree was committed on top of a new base. The squash was CLEAN and the old code is self-consistent, so every gate passed while it undid: - the cinematic epic #1253: #1272, #1275, #1278, #1280, #1282, #1283 and #1285, with their tests and visual baselines; - #1279's Parquet export for duplicate groups (exports.rs, read.rs, export_write.rs and the ExportIn doc comment). This is the merge #1286 should have produced, computed rather than hand-picked: 1. Give d245d4a's tree its real parent, dc45fd1. 2. Three-way merge it into 2b8f0b8, the main it landed on, with base dc45fd1. No conflicts. 3. Carry the difference from 248e296 onto today's main with another three-way merge. No conflicts. #1286's own work is kept: the usage endpoint, the record allowance, and the docs on usage and the 402. Closes #1299 Co-authored-by: bmoore813 <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Nov 27, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1252
What
format: parquetnow works for duplicate groups. Each group is one row, and its members are a nestedList<Struct<key, confidence>>. The golden preview is onegoldenstruct. The Arrow schema is declared up front from the typedPersonDuplicateGroup/AccountDuplicateGroup(DuplicateGroups::arrow_schema), and batches are built straight from those structs (DuplicateGroups::to_record_batch), never through JSON.ExportRequest::from_paramsnow refuses only duplicates as CSV.Why
#1241 left duplicates as JSON Lines only, because inferring a schema from page one breaks when a nullable field first carries a value on a later page. A schema declared before the first page avoids that.
Proof
make check: pass (exit 0, run from the repo root on this head; an earlier run hit a pre-existinger-cliflake, see the ledger)DEDUPE_E2E_DUCKLAKE=1 cargo test -p er-server --test main export_write(the lake-backed case inmake check-e2e): pass. R's three account groups at page size 2 come back as three rows, and each row's members, member confidences, group confidence and company name match the JSON Lines export. An empty lake gives a readable zero-row file.exports::tests::duplicates_round_trip_through_parquet_across_a_page_boundary: three pages, with page one'sgroup_confidence,master_record_key, memberconfidenceandgolden.emailnull on every row, an empty page, and page three setting them all. The file read back has the declared schema, one row per group, and the nested members.Risk & rollback
This is additive: JSONL and the CSV refusal (still 422) are unchanged. Rollback is
git revert <merge-sha>.Post-merge ledger
Closed by: unclosed
mainis green with this change on it — the merge SHA, and the runthat proves it. A later head SHA with this commit as an ancestor counts;
a cancelled run with zero jobs does not:
imagesbuilt, or correctly never ran because nothing that goes intoan image changed:
deployconverged — proved by a line the running process emitted, notby the image digest and not by the workflow conclusion:
deploy,drift,kind's nightly leg) is green, or knowingly red for a reason that is notthis change:
Donethrough the automation rather than byhand, and the issue closed:
(a skill, a reference, memory) — or nothing new was learned:
Specific to this change
er-cli'scli::tests::dictionary_rows_match_server_canonical_forms_and_hashesflaked once in the localmake check(about 1 in 3 runs in isolation). Its two parallel tests can build the same temp path from pid plus nanos. This predates the change and the diff doesn't touch it. File a ticket if it shows up in CI.Context — plan, discoveries, measurements, files
Discoveries
member_confidencesmap into the list it is keyed by:{key, confidence}, with confidence null for an unscored member. This is theList<Struct>the ticket asks for.ExportIndoc comment and theExportFormatdocs changed.LINEAGE_COLUMNS.Files
rust/crates/er-server/src/read.rs:DuplicateGroups::arrow_schema/to_record_batch, plus helpersrust/crates/er-server/src/exports.rs:DuplicatesParquetwriter,duplicate_pages, the lifted refusal, unit testsrust/crates/er-server/tests/export_write.rs: case 8, duplicates Parquet over a real lakerust/crates/er-server/src/lib.rs:ExportIn.formatdoc🤖 Generated with Claude Code