HBASE-16818 Avoid multiple copies of binary data during the conversion from Result to Row (Weiqing Yang)
This commit is contained in:
parent
5f75fa0c4f
commit
a68c0e2a34
|
@ -276,7 +276,11 @@ case class HBaseRelation (
|
|||
(x, null)
|
||||
} else {
|
||||
val v = CellUtil.cloneValue(kv)
|
||||
(x, Utils.hbaseFieldToScalaType(x, v, 0, v.length))
|
||||
(x, x.dt match {
|
||||
// Here, to avoid arraycopy, return v directly instead of calling hbaseFieldToScalaType
|
||||
case BinaryType => v
|
||||
case _ => Utils.hbaseFieldToScalaType(x, v, 0, v.length)
|
||||
})
|
||||
}
|
||||
}.toMap
|
||||
val unionedRow = keySeq ++ valueSeq
|
||||
|
|
Loading…
Reference in New Issue