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 2019/02/09 12:58:37 UTC

[GitHub] HyukjinKwon commented on a change in pull request #23746: [SPARK-26761][SQL][R] Vectorized R gapply() implementation

HyukjinKwon commented on a change in pull request #23746: [SPARK-26761][SQL][R] Vectorized R gapply() implementation
URL: https://github.com/apache/spark/pull/23746#discussion_r255298042
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/api/r/RRunner.scala
 ##########
 @@ -91,28 +91,70 @@ private[spark] class RRunner[U](
     }
 
     try {
-      return new Iterator[U] {
-        def next(): U = {
-          val obj = _nextObj
-          if (hasNext) {
-            _nextObj = read()
-          }
-          obj
+      newReaderIterator(dataStream, errThread)
+    } catch {
+      case e: Exception =>
+        throw new SparkException("R computation failed with\n " + errThread.getLines(), e)
+    }
+  }
+
+  protected def newReaderIterator(
 
 Review comment:
   Codes here are almost not changed. I just exposed some method to inherit it in ArrowRRunner. This code needs refactoring as a common parent like PythonRunner but I don't target it here.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org