Repository navigation
Description
Connector
Doris
Feature area
Metadata ingestion
Describe the bug
Doris prints a CHAR(255) column, and a CHAR without a length (for example a view column defined as CAST(x AS CHAR)), as character(255) in SHOW FULL COLUMNS. _get_column in ingestion/src/metadata/ingestion/source/database/doris/metadata.py keeps that type name, so the column gets the data type CHARACTER, which is not a valid DataType, and the column is skipped with only a warning. ARRAY<CHAR(255)> columns, printed as array<character(255)>, get CHARACTER as their element type the same way. Doris 3.1 through 4.2 and master all print these columns this way.
To Reproduce
- In Doris, create a table and a view:
CREATE TABLE t_char (k INT NOT NULL, c_char_10 CHAR(10), c_char_255 CHAR(255), c_arr_char_255 ARRAY<CHAR(255)>) DUPLICATE KEY(k) DISTRIBUTED BY HASH(k) BUCKETS 1 PROPERTIES ("replication_num" = "1"); CREATE VIEW v_char AS SELECT k, CAST(c_char_10 AS CHAR) AS c_cast_char, c_char_255 FROM t_char;
- Run metadata ingestion for the database.
c_char_255andc_arr_char_255are missing fromt_char,c_cast_charandc_char_255are missing fromv_char, and the log shows the validation error below.
Expected behavior
character(N) maps to CHAR with length N, the same as char(N); the generic ColumnTypeParser already maps CHARACTER to CHAR. dataTypeDisplay keeps the text Doris printed.
Connection / ingestion config
No response
Logs
WARNING {metadata.Ingestion:metadata:281} - Unexpected exception processing column [{'name': 'c_char_255', 'default': None, 'nullable': True, 'type': 'character(255)', 'data_type': NullType(), 'display_type': 'character(255)', 'system_data_type': 'CHARACTER', ...}]: 1 validation error for Column
dataType
Input should be 'NUMBER', 'TINYINT', 'SMALLINT', ... or 'HIERARCHYID' [type=enum, input_value='CHARACTER', input_type=str]
OS
macOS (arm64)
Python version
3.12
OpenMetadata version
main (119b8e1)
OpenMetadata Ingestion package version
main (119b8e1)
Additional context
Part of #37537. Reproduced with main (119b8e1) 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.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone ✅
Activity