Repository navigation
Backport #31978 to 1.13: deduplicate Glue columns so partition keys do not drop the whole table - #32106
Merged
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.
Contributor
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
harshsoni2024
approved these changes
Aug 27, 2026
Code Review ✅ ApprovedBackports the Glue column deduplication fix to prevent partition keys from duplicating columns and dropping tables. 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 |
|
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.



Backport of #31978 to
1.13. 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.One conflict needed resolving:
1.13importsget_connectionwheremainusesclose_on_failure/create_connection, which do not exist on this branch. Kept the1.13import and added onlymodel_str, which the fix needs. Everything else is byte-identical tomainso future backports of this area apply cleanly.Tests
pytest ingestion/tests/unit/topology/database/test_glue.py: 16 passedGreptile Summary
The backport prevents Glue tables from being rejected when regular columns and partition keys contain the same emitted name.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR G[Glue table metadata] --> I[Iterate regular columns and partition keys] I --> N[Convert to OpenMetadata columns] N --> D[Deduplicate emitted names] D --> R[CreateTableRequest] R --> S[OpenMetadata server]Reviews (3): Last reviewed commit: "Merge branch '1.13' into cherry-pick/glu..." | Re-trigger Greptile
Context used: