You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Chao Sun (Jira)" <ji...@apache.org> on 2023/04/14 00:50:00 UTC
[jira] [Assigned] (SPARK-43121) Use `BytesWritable.copyBytes` instead of manual copy in `HiveInspectors`
[ https://issues.apache.org/jira/browse/SPARK-43121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chao Sun reassigned SPARK-43121:
--------------------------------
Assignee: Yang Jie
> Use `BytesWritable.copyBytes` instead of manual copy in `HiveInspectors`
> ------------------------------------------------------------------------
>
> Key: SPARK-43121
> URL: https://issues.apache.org/jira/browse/SPARK-43121
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 3.5.0
> Reporter: Yang Jie
> Assignee: Yang Jie
> Priority: Minor
>
> // BytesWritable.copyBytes() only available since Hadoop2
> // In order to keep backward-compatible, we have to copy the
> // bytes with old apis
> val bw = x.getPrimitiveWritableObject(data)
> val result = new Array[Byte](bw.getLength())
> System.arraycopy(bw.getBytes(), 0, result, 0, bw.getLength())
> result
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org