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

   **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 `BLOB` column and write one row.
   2. Read it from Hive: `SELECT * FROM t;`
   
   The query always fails with:
   
   ```
   java.lang.ClassCastException: org.apache.paimon.data.BlobData cannot be cast 
to [B
   ```
   
   `PaimonObjectInspectorFactory.create()` groups `case BLOB:` with 
`BINARY`/`VARBINARY` and returns Hive's `JavaBinaryObjectInspector`, whose 
`getPrimitiveJavaObject` casts its input to `byte[]`. The read path hands it a 
`Blob` instead: `InternalRow.createFieldGetter` maps `case BLOB:` to 
`row.getBlob(pos)`.
   
   The Spark connector (`DataConverter`, `((Blob) o).toData()`) and the Flink 
connector (`FlinkRowDataWithBlob`) already convert at the engine boundary; Hive 
is the only one missing it.
   
   **What doesn't meet your expectations?**
   Expected: reading a BLOB column from Hive returns its binary content.
   Actual: every such query fails with `ClassCastException`.
   
   **Anything else?**
   Introduced by #8070, whose tests only feed `byte[]` directly, so the defect 
was never exercised.
   
   **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