Skip to content

Fixes #37539: Doris ipv4/ipv6 columns dropped during metadata ingestion - #37551

Merged
pmbrull merged 1 commit into
open-metadata:mainfrom
morningman:doris-ip-column-types
Nov 16, 2026
Merged

pmbrull merged 1 commit into
open-metadata:mainfrom
morningman:doris-ip-column-types

Conversation

@morningman

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #37539

_parse_type in the Doris connector cut any type name whose second-to-last character is v at the v, so ipv4/ipv6 became IP. IP is not a DataType, so those columns were skipped with a warning, and ARRAY<IPV4> columns got IP as 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:

  • Bug fix

High-level design:

N/A — small change.

Tests:

Use cases covered

  • Metadata ingestion of a Doris table with IPV4, IPV6 and ARRAY<IPV4> columns keeps those columns, with the IPV4/IPV6 data types.
  • Versioned type names (datev2, datetimev2(3), decimalv3(10,2)) still map to DATE, DATETIME and DECIMAL.

Unit tests

  • I added unit tests for the new/changed logic.
  • Files added/updated: ingestion/tests/unit/source/database/doris/test_doris_column_types.py
    • a table-driven test of the type strings Doris prints in SHOW FULL COLUMNS, plus array element types;
    • a test that runs DorisSource.get_columns_and_constraints on real SHOW FULL COLUMNS rows from Doris (only the database connection is replaced) and checks that the IP columns are ingested.
  • On 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.
  • Coverage %: 77% on doris/metadata.py; _parse_type, the changed function, is fully covered.

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

Playwright (UI) tests

  • Not applicable (no UI changes).

Manual testing performed

  1. Started a local Apache Doris master build (6991e766329) with a table of 23 columns covering most Doris types, including IPV4 and IPV6.
  2. Ran the Doris source's yield_table against it with a mocked OpenMetadata client, before and after this change:
    • before: 21 columns ingested, with Unexpected exception processing column warnings for c_ipv4 and c_ipv6 (input_value='IP');
    • after: all 23 columns ingested, c_ipv4 as IPV4 and c_ipv6 as IPV6, no warnings; the other tables in the database are unchanged.
  3. make py_format_check and make static-checks pass (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.md and 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.

_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.
@morningman
morningman requested a review from a team as a code owner November 11, 2026 10:08
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This 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 skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Changing Doris type normalization could misclassify type names, causing columns to be omitted or represented incorrectly during metadata ingestion.

Fixes Doris _parse_type so ipv4/ipv6 columns are no longer truncated to IP and dropped during metadata ingestion, and ARRAY<IPV4> element types are preserved. Only known storage-format suffixes (datev2, datetimev2, decimalv2/decimalv3, timev2) are now mapped, with unit tests covering both. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@pmbrull
pmbrull merged commit baccd4b into open-metadata:main Nov 16, 2026
56 of 57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doris: ipv4/ipv6 columns are silently dropped during metadata ingestion

2 participants