You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/10/25 03:57:07 UTC
[GitHub] [spark] zhengruifeng opened a new pull request, #38383: [SPARK-40906][SQL] `Mode` should copy keys before inserting into Map
zhengruifeng opened a new pull request, #38383:
URL: https://github.com/apache/spark/pull/38383
### What changes were proposed in this pull request?
`Mode` should copy keys before inserting into Map
### Why are the changes needed?
the result maybe incorrect:
```
val df = sc.parallelize(Seq.empty[Int], 4)
.mapPartitionsWithIndex { (idx, iter) =>
if (idx == 3) {
Iterator("3", "3", "3", "3", "4")
} else {
Iterator("0", "1", "2", "3", "4")
}
}.toDF("a")
df.select(mode(col("a"))).show
+-------+
|mode(a)|
+-------+
| 4|
+-------+
```
after this fix:
```
df.select(mode(col("a"))).show
+-------+
|mode(a)|
+-------+
| 3|
+-------+
```
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
added UT
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] zhengruifeng commented on pull request #38383: [SPARK-40906][SQL] `Mode` should copy keys before inserting into Map
Posted by GitBox <gi...@apache.org>.
zhengruifeng commented on PR #38383:
URL: https://github.com/apache/spark/pull/38383#issuecomment-1290029306
cc @cloud-fan @beliefer
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] zhengruifeng commented on pull request #38383: [SPARK-40906][SQL] `Mode` should copy keys before inserting into Map
Posted by GitBox <gi...@apache.org>.
zhengruifeng commented on PR #38383:
URL: https://github.com/apache/spark/pull/38383#issuecomment-1290060715
@cloud-fan thanks for the reviews
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan commented on pull request #38383: [SPARK-40906][SQL] `Mode` should copy keys before inserting into Map
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on PR #38383:
URL: https://github.com/apache/spark/pull/38383#issuecomment-1290043323
thanks, merging to master!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] zhengruifeng commented on pull request #38383: [SPARK-40906][SQL] `Mode` should copy keys before inserting into Map
Posted by GitBox <gi...@apache.org>.
zhengruifeng commented on PR #38383:
URL: https://github.com/apache/spark/pull/38383#issuecomment-1290060770
@cloud-fan thanks for the reviews
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] zhengruifeng commented on pull request #38383: [SPARK-40906][SQL] `Mode` should copy keys before inserting into Map
Posted by GitBox <gi...@apache.org>.
zhengruifeng commented on PR #38383:
URL: https://github.com/apache/spark/pull/38383#issuecomment-1289944021
will also send a separate fix for `PandasMode` since it's dedicated for Pandas
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan closed pull request #38383: [SPARK-40906][SQL] `Mode` should copy keys before inserting into Map
Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #38383: [SPARK-40906][SQL] `Mode` should copy keys before inserting into Map
URL: https://github.com/apache/spark/pull/38383
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org