Repository navigation
Backport #31978 to 2.0: deduplicate Glue columns so partition keys do not drop the whole table - #32105
Conversation
…the whole table (#31978) * fix(ingestion): stop a repeated Glue partition key from dropping the whole table get_columns yielded StorageDescriptor.Columns then PartitionKeys unfiltered, so an overlapping partition key was emitted twice and the server rejected the table with 400 "Column name <name> is repeated". Dedupe once in get_columns over a shared _iter_columns, covering the Iceberg, Iceberg-fallback and standard paths. Keys on the emitted name so truncation collisions are caught too. * fix(ingestion): satisfy basedpyright on the dynamic table_data context attribute * fix(ingestion): report a routine Glue duplicate column at debug, not warning Source warnings are counted into the workflow summary, so warning on every repeated partition key reported healthy Iceberg and Spectrum tables as problems on a run that ingested every table correctly. Say why a name can arrive twice: Glue lists a partition key in StorageDescriptor.Columns as well as PartitionKeys, and lower cases column names on write.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
Code Review ✅ ApprovedBackports deduplication logic for Glue columns to prevent duplicate column names from dropping entire tables during ingestion. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
✅ Playwright Results — workflow succeededValidated commit ✅ 110 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 1h 0m 13s ⏱️ Max setup 3m 46s · max shard execution 12m 25s · max shard-job elapsed before upload 17m 40s · reporting 3s 🌐 211.55 requests/attempt · 1.79 app boots/UI scenario · 0.00% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Backport of #31978 to
2.0. Original issue: #31975.GlueSource.get_columnsyieldedStorageDescriptor.Columnsand thenPartitionKeysunfiltered. When the two overlap the column is emitted twice, the server rejects the table with 400Column name <name> is repeated, and the table is never created while the run still reports a high success percentage.Applied cleanly, so the diff is identical to what merged on
main.Tests
pytest ingestion/tests/unit/topology/database/test_glue.py: 16 passedGreptile Summary
This backport prevents Glue tables from being rejected when regular columns and partition keys emit the same final column name.
_iter_columns.Confidence Score: 5/5
The PR appears safe to merge with no actionable correctness, security, or repository-rule issues identified.
The deduplication preserves existing enumeration and exception handling while preventing duplicate emitted names across all tested Glue paths.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Glue regular columns] --> C[_iter_columns] B[Glue partition keys] --> C C --> D[get_columns deduplication] D -->|First occurrence| E[OpenMetadata columns] D -->|Repeated emitted name| F[Skip and debug log]Reviews (1): Last reviewed commit: "Fixes #31975: deduplicate Glue columns s..." | Re-trigger Greptile