Baymine opened a new pull request, #65911:
URL: https://github.com/apache/doris/pull/65911

   ### What problem does this PR solve?
   
   Issue Number: close #65910
   
   Problem Summary: Hive column types with explicit precision/length 
annotations (e.g. `tinyint(3,0)`, `smallint(5,0)`, `int(10,0)`, `bigint(19,0)`, 
`timestamp(19)`) and the Hive `datetime` type were not recognized by 
`HiveMetaStoreClientHelper.hiveTypeToDorisType`. They fell through to the 
`Type.UNSUPPORTED` fallback, which made the corresponding Hive columns 
unreadable from Doris Hive/HMS external catalogs.
   
   This change:
   - Adds a `case "datetime"` arm to the exact-match switch, mapping it to 
`datetimev2(timeScale)` (same as `timestamp`).
   - Adds `startsWith` arms for `bigint`, `int`, `tinyint`, `smallint` and 
`timestamp` so the precision-annotated forms (e.g. `int(10,0)`) resolve to the 
same Doris type as their plain form. The `timestamp with local time zone` arm 
is kept ahead of the new `timestamp` arm so it is matched first.
   
   End-to-end: Hive columns declared as `tinyint(3,0)`, `int(10,0)`, 
`bigint(19,0)`, `timestamp(19)` or `datetime` now resolve to the correct Doris 
type instead of `UNSUPPORTED`.
   
   ### Release note
   
   Hive columns of types `datetime`, `tinyint(n,m)`, `smallint(n,m)`, 
`int(n,m)`, `bigint(n,m)` and `timestamp(n)` are now correctly mapped to the 
corresponding Doris types when reading Hive/HMS external tables.
   
   ### Check List (For Author)
   
   - Test
       - [x] Unit Test — added `HiveTypeToDorisTypeTest` (`Tests run: 8, 
Failures: 0, Errors: 0, Skipped: 0`).
   - Behavior changed:
       - [x] Yes — Hive types that previously resolved to `UNSUPPORTED` now 
resolve to a concrete Doris type, so previously unreadable Hive columns become 
readable.
   - Does this need documentation?
       - [x] No.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to