Skip to content

Commit 2a16081

Browse files
committed
fix
1 parent 235a7aa commit 2a16081

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

paimon-spark/paimon-spark4-common/src/main/scala/org/apache/paimon/spark/data/Spark4InternalRowWithBlob.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ import org.apache.paimon.utils.InternalRowUtils.copyInternalRow
2525
import org.apache.spark.sql.catalyst.InternalRow
2626
import org.apache.spark.unsafe.types.VariantVal
2727

28-
class Spark4InternalRowWithBlob(rowType: RowType, blobFieldIndex: Int, blobAsDescriptor: Boolean)
28+
class Spark4InternalRowWithBlob(rowType: RowType, blobFields: Set[Int], blobAsDescriptor: Boolean)
2929
extends Spark4InternalRow(rowType) {
3030

3131
override def getBinary(ordinal: Int): Array[Byte] = {
32-
if (ordinal == blobFieldIndex) {
32+
if (blobFields.contains(ordinal)) {
3333
if (blobAsDescriptor) {
3434
row.getBlob(ordinal).toDescriptor.serialize()
3535
} else {

paimon-spark/paimon-spark4-common/src/main/scala/org/apache/spark/sql/paimon/shims/Spark4Shim.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ class Spark4Shim extends SparkShim {
5757

5858
override def createSparkInternalRowWithBlob(
5959
rowType: RowType,
60-
blobFieldIndex: Int,
60+
blobFields: Set[Int],
6161
blobAsDescriptor: Boolean): SparkInternalRow = {
62-
new Spark4InternalRowWithBlob(rowType, blobFieldIndex, blobAsDescriptor)
62+
new Spark4InternalRowWithBlob(rowType, blobFields, blobAsDescriptor)
6363
}
6464

6565
override def createSparkArrayData(elementType: DataType): SparkArrayData = {

0 commit comments

Comments
 (0)