thswlsqls opened a new issue, #9074:
URL: https://github.com/apache/paimon/issues/9074

   **Search before asking**
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   **Paimon version**
   master @ a5e87ebf6 (2.1-SNAPSHOT)
   
   **Compute Engine**
   Hive
   
   **Minimal reproduce step**
   1. Create a Paimon table with a `CHAR(300)` (or `VARCHAR(100000)`) column 
via Flink/Spark — Paimon allows lengths up to `Integer.MAX_VALUE`.
   2. Read that table from Hive.
   
   `PaimonSerDe.initialize()` builds a `PaimonInternalRowObjectInspector`, 
which calls `PaimonObjectInspectorFactory.create()` 
(paimon-hive/paimon-hive-connector-common, line 65-74) for every field. That 
method passes the Paimon length straight to the inspector constructor, which 
throws `RuntimeException: Char length 300 out of allowed range [1, 255]`.
   
   **What doesn't meet your expectations?**
   Expected: the column is read as `string`. Actual: a single long column makes 
the whole table unreadable from Hive.
   
   **Anything else?**
   The sibling `HiveTypeUtils.PaimonToHiveTypeVisitor` 
(paimon-hive/paimon-hive-common, line 149-164) already clamps to `string` with 
`HiveChar.MAX_CHAR_LENGTH` / `HiveVarchar.MAX_VARCHAR_LENGTH`. That clamp came 
from #1568 (fix #1565), which did not update this factory, so 
`varchar(2147483646)` from #1565 still fails here.
   
   **Are you willing to submit a PR?**
   - [x] I'm willing to submit a PR!
   
   


-- 
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]

Reply via email to