apache / apache/doris

Hive types datetime / tinyint(n,m) / smallint(n,m) / int(n,m) / bigint(n,m) / timestamp(n) are not mapped to Doris types

Open Beginner friendly
#65,910 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
15.9k
Forks
3.9k
Avg merge
2d 23h
Merged PRs (30d)
520

Description

### Describe what's wrong

Hive columns declared with explicit precision/length annotations — e.g. `tinyint(3,0)`, `smallint(5,0)`, `int(10,0)`, `bigint(19,0)`, `timestamp(19)` — and columns of the Hive `datetime` type are returned as `UNSUPPORTED` by `HiveMetaStoreClientHelper.hiveTypeToDorisType`, which makes those columns unreadable through Doris Hive/HMS external catalogs.

### Behavior

- `tinyint(3,0)` → `UNSUPPORTED` (expected `TINYINT`)
- `smallint(5,0)` → `UNSUPPORTED` (expected `SMALLINT`)
- `int(10,0)` → `UNSUPPORTED` (expected `INT`)
- `bigint(19,0)` → `UNSUPPORTED` (expected `BIGINT`)
- `timestamp(19)` → `UNSUPPORTED` (expected `datetimev2`)
- `datetime` → `UNSUPPORTED` (expected `datetimev2`)

### How to reproduce

Create a Hive table with a column of type `int(10,0)` (or any of the above) and query it from a Doris HMS external catalog — the column is reported as unsupported.

### Expected behavior

All of the above Hive types should map to the same Doris type as their plain form (`int`, `bigint`, `tinyint`, `smallint`, `timestamp`), and `datetime` should map to `datetimev2(timeScale)`.

Contributor guide

Open the contributing guide

Research direction

Start with HiveMetaStoreClientHelper.hiveTypeToDorisType and trace how Hive type strings are parsed before the mapping decision. Reproduce the listed annotated integer, timestamp, and datetime cases against an HMS external catalog; done means each returns the corresponding Doris type instead of UNSUPPORTED.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
database
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.