You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2016/11/03 05:26:58 UTC
[jira] [Commented] (SPARK-14393) values generated by
non-deterministic functions shouldn't change after coalesce or union
[ https://issues.apache.org/jira/browse/SPARK-14393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15631653#comment-15631653 ]
Apache Spark commented on SPARK-14393:
--------------------------------------
User 'felixcheung' has created a pull request for this issue:
https://github.com/apache/spark/pull/15747
> values generated by non-deterministic functions shouldn't change after coalesce or union
> ----------------------------------------------------------------------------------------
>
> Key: SPARK-14393
> URL: https://issues.apache.org/jira/browse/SPARK-14393
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 1.6.0, 2.0.0, 2.0.1
> Reporter: Jason Piper
> Assignee: Xiangrui Meng
> Priority: Blocker
> Labels: correctness, releasenotes
> Fix For: 2.1.0
>
>
> When utilising monotonicallyIncreasingId with a coalesce, it appears that every partition uses the same offset (0) leading to non-monotonically increasing IDs.
> See examples below
> {code}
> >>> sqlContext.range(10).select(monotonicallyIncreasingId()).show()
> +---------------------------+
> |monotonicallyincreasingid()|
> +---------------------------+
> | 25769803776|
> | 51539607552|
> | 77309411328|
> | 103079215104|
> | 128849018880|
> | 163208757248|
> | 188978561024|
> | 214748364800|
> | 240518168576|
> | 266287972352|
> +---------------------------+
> >>> sqlContext.range(10).select(monotonicallyIncreasingId()).coalesce(1).show()
> +---------------------------+
> |monotonicallyincreasingid()|
> +---------------------------+
> | 0|
> | 0|
> | 0|
> | 0|
> | 0|
> | 0|
> | 0|
> | 0|
> | 0|
> | 0|
> +---------------------------+
> >>> sqlContext.range(10).repartition(5).select(monotonicallyIncreasingId()).coalesce(1).show()
> +---------------------------+
> |monotonicallyincreasingid()|
> +---------------------------+
> | 0|
> | 1|
> | 0|
> | 0|
> | 1|
> | 2|
> | 3|
> | 0|
> | 1|
> | 2|
> +---------------------------+
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org