Skip to content

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

Closed

Description

@morningman

Connector

Doris

Feature area

Metadata ingestion

Describe the bug

_parse_type in ingestion/src/metadata/ingestion/source/database/doris/metadata.py treats any type whose second-to-last character is v as a versioned type and cuts it at the v. So ipv4/ipv6 become IP, which is not a valid DataType, and the column is skipped with only a warning. ARRAY<IPV4> columns get IP as their element type the same way.

To Reproduce

  1. Create a Doris table with IP columns, e.g. CREATE TABLE t (k BIGINT, c_ipv4 IPV4, c_ipv6 IPV6) DUPLICATE KEY(k) DISTRIBUTED BY HASH(k) BUCKETS 1 PROPERTIES ("replication_num" = "1").
  2. Run metadata ingestion for the database.
  3. Both IP columns are missing from the table entity, and the log shows the validation error below.

Expected behavior

ipv4/ipv6 map to the existing IPV4/IPV6 data types. Only the known storage-format suffixes are stripped (datev2, datetimev2, decimalv2/decimalv3, timev2).

Connection / ingestion config

No response

Logs

WARNING  {metadata.Ingestion:metadata:281} - Unexpected exception processing column [{'name': 'c_ipv4', 'default': None, 'nullable': True, 'type': 'ipv4', 'data_type': IPV4(), 'display_type': 'ipv4', 'system_data_type': 'IP', ...}]: 1 validation error for Column
dataType
  Input should be 'NUMBER', 'TINYINT', 'SMALLINT', ... or 'HIERARCHYID' [type=enum, input_value='IP', input_type=str]

OS

macOS (arm64)

Python version

3.12

OpenMetadata version

main (1e55df4) and 2.0.7.2

OpenMetadata Ingestion package version

2.0.7.2 and main (1e55df4)

Additional context

Part of #37537. Reproduced with openmetadata-ingestion 2.0.7.2 and main (1e55df4) against Apache Doris master (6991e766329). A fix with tests is ready; the PR will reference this issue.

Pre-submission checklist

  • I searched for duplicate issues.
  • I removed credentials, hostnames, emails, and other sensitive data from logs and config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      Done ✅

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions