Repository navigation
Fixes #37539: Doris ipv4/ipv6 columns dropped during metadata ingestion - #37551
Conversation
_parse_type treated any type whose second-to-last character is "v" as a versioned type and cut it at the "v", so ipv4/ipv6 became "IP", which is not a DataType, and those columns were skipped with a warning. Map only the known storage-format suffixes (datev2, datetimev2, decimalv2/v3, timev2) and keep other type names as they are. ARRAY<ipv4> element types go through the same function.
❌ 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 |
Code Review ✅ Approved 🟡 Medium riskChanging Doris type normalization could misclassify type names, causing columns to be omitted or represented incorrectly during metadata ingestion. Fixes Doris VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes #37539
_parse_typein the Doris connector cut any type name whose second-to-last character isvat thev, soipv4/ipv6becameIP.IPis not aDataType, so those columns were skipped with a warning, andARRAY<IPV4>columns gotIPas their element type. This change maps only the known storage-format suffixes (datev2,datetimev2,decimalv2/decimalv3,timev2) and keeps every other type name as it is.Part of #37537.
Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
IPV4,IPV6andARRAY<IPV4>columns keeps those columns, with theIPV4/IPV6data types.datev2,datetimev2(3),decimalv3(10,2)) still map toDATE,DATETIMEandDECIMAL.Unit tests
ingestion/tests/unit/source/database/doris/test_doris_column_types.pySHOW FULL COLUMNS, plus array element types;DorisSource.get_columns_and_constraintson realSHOW FULL COLUMNSrows from Doris (only the database connection is replaced) and checks that the IP columns are ingested.main, 5 of these tests fail (ipv4,ipv6,array<ipv4>,array<ipv6>and the ingestion test); with this change they all pass.make unit_ingestion ARGS="-n 0 tests/unit/source/database/doris tests/unit/topology/database/test_doris.py": 53 passed.doris/metadata.py;_parse_type, the changed function, is fully covered.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
IPV4andIPV6.yield_tableagainst it with a mocked OpenMetadata client, before and after this change:Unexpected exception processing columnwarnings forc_ipv4andc_ipv6(input_value='IP');c_ipv4asIPV4andc_ipv6asIPV6, no warnings; the other tables in the database are unchanged.make py_format_checkandmake static-checkspass (0 errors).UI screen recording:
Not applicable — ingestion-only bug fix with no UI change.
Checklist:
I have read the CONTRIBUTING document.
My PR title is
Fixes <issue-number>: <short explanation>My PR is linked to a GitHub issue via
Fixes #<issue-number>above.I have commented on my code, particularly in hard-to-understand areas.
For JSON Schema changes: I updated the migration scripts or explained why it is not needed. (N/A: no schema change)
For a UI feature or feature task: as part of PR creation, I ran the PR build in Docker with sample data and embedded a verified GitHub-hosted recording plus build/health evidence above (or explained why this requirement is not applicable). (N/A: not a UI change)
I have added tests (unit / integration / Playwright as applicable) and listed them above.
Self-review: I reviewed the final diff against
REVIEW.mdand fixed every 🔴 finding, or answered it on the line below.Decision check: if this PR decides something the next contributor could undo, it adds a record under
docs/decisions/. (N/A: bug fix, no durable decision)I have added a test that covers the exact scenario we are fixing. For complex issues, comment the issue number in the test for future reference.