Search before asking
Paimon version
master @ a5e87eb (2.1-SNAPSHOT)
Compute Engine
Hive
Minimal reproduce step
- Create a Paimon table with a
BLOB column and write one row.
- 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?
Search before asking
Paimon version
master @ a5e87eb (2.1-SNAPSHOT)
Compute Engine
Hive
Minimal reproduce step
BLOBcolumn and write one row.SELECT * FROM t;The query always fails with:
PaimonObjectInspectorFactory.create()groupscase BLOB:withBINARY/VARBINARYand returns Hive'sJavaBinaryObjectInspector, whosegetPrimitiveJavaObjectcasts its input tobyte[]. The read path hands it aBlobinstead:InternalRow.createFieldGettermapscase BLOB:torow.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?