Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/18645#discussion_r127611412
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
@@ -2537,8 +2537,9 @@ class Dataset[T] private[sql](
* @group action
* @since 1.6.0
*/
- def foreachPartition(func: ForeachPartitionFunction[T]): Unit =
- foreachPartition(it => func.call(it.asJava))
+ def foreachPartition(func: ForeachPartitionFunction[T]): Unit = {
+ foreachPartition((it: Iterator[T]) => func.call(it.asJava))
--- End diff --
In cases like this I resolved the ambiguity by casting the argument,
instead of implementing an interface -- because in cases like this the
interface version exists just for Java support.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]