thswlsqls opened a new pull request, #9075:
URL: https://github.com/apache/paimon/pull/9075

   
   ### Purpose
   
   fix #9074
   
   - `PaimonObjectInspectorFactory.create()` built 
`PaimonCharObjectInspector`/`PaimonVarcharObjectInspector` with the raw Paimon 
length, so a `CHAR(>255)` or `VARCHAR(>65535)` column made every Hive read of 
that table throw `RuntimeException: ... out of allowed range`.
   - Clamp both to `PaimonStringObjectInspector` under the same conditions as 
the sibling `HiveTypeUtils.PaimonToHiveTypeVisitor`, so the inspector matches 
the `string` type `HiveTypeUtils.toTypeInfo()` already returns.
   - That clamp came from #1568 (fix #1565) but was never applied to this 
factory, so the `varchar(2147483646)` case from #1565 still fails today.
   - Lengths within the Hive limits are unchanged.
   
   ### Tests
   
   - Added 
`PaimonObjectInspectorFactoryTest#testCreateCharVarcharObjectInspectorExceedingHiveLimit`
 and `#testCreateCharVarcharObjectInspectorWithinHiveLimit`.
   - `mvn -pl paimon-hive/paimon-hive-connector-common clean install` passed on 
JDK 11 — 102 unit tests and 83 `*ITCase` tests, plus checkstyle, spotless and 
enforcer.
   - Reverting the fix and rerunning makes the three new positive assertions 
fail with the original exception.
   
   
   


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