zhenlineo commented on code in PR #41129:
URL: https://github.com/apache/spark/pull/41129#discussion_r1191450205


##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala:
##########
@@ -2293,6 +2309,19 @@ class SparkConnectPlanner(val session: SparkSession) {
       writer.queryName(writeOp.getQueryName)
     }
 
+    if (writeOp.hasForeach) {
+      if (writeOp.getForeach.hasPythonWriter) {
+        val foreach = writeOp.getForeach.getPythonWriter
+        val pythonFcn = transformPythonForeachFunction(foreach)
+        writer.foreachPython(new PythonForeachWriter(pythonFcn, 
dataset.schema))
+      } else {
+        val scalaFcn = Utils.deserialize[ForeachWriter[Row]]( // TODO(wei): 
row? String?

Review Comment:
   Your code looks correct. Let me know if you have any other issues to run 
your tests.



-- 
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-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to