[
https://issues.apache.org/jira/browse/SPARK-12421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Armbrust resolved SPARK-12421.
--------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
Issue resolved by pull request 10553
[https://github.com/apache/spark/pull/10553]
> Fix copy() method of GenericRow
> --------------------------------
>
> Key: SPARK-12421
> URL: https://issues.apache.org/jira/browse/SPARK-12421
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 1.6.0
> Reporter: doepfner
> Priority: Minor
> Fix For: 2.0.0
>
>
> The copy() method of the GenericRow class does actually not copy itself. The
> method just returns itself.
> Simple reproduction code of the issue:
> import org.apache.spark.sql.Row;
> val row = Row.fromSeq(Array(1,2,3,4,5))
> val arr = row.toSeq.toArray
> arr(0) = 6
> row // first value changed to 6
> val rowCopied = row.copy()
> val arrCopied = rowCopied.toSeq.toArray
> arrCopied(0) = 7
> row // first value still changed (to 7)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]