hvanhovell commented on code in PR #49560:
URL: https://github.com/apache/spark/pull/49560#discussion_r1968788349
##########
sql/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala:
##########
@@ -1034,6 +1038,49 @@ class SparkConnectPlanner(
.logicalPlan
}
+ private def transformTransformWithStateInPandas(
+ pythonUdf: PythonUDF,
+ groupedDs: RelationalGroupedDataset,
+ rel: proto.GroupMap): LogicalPlan = {
+ val twsInfo = rel.getTransformWithStateInfo
+ val outputSchema = parseSchema(twsInfo.getOutputSchema)
+
+ if (rel.hasInitialInput) {
+ val initialGroupingCols =
rel.getInitialGroupingExpressionsList.asScala.toSeq.map(expr =>
+ Column(transformExpression(expr)))
+
+ val initialStateDs = Dataset
+ .ofRows(session, transformRelation(rel.getInitialInput))
Review Comment:
I am aware it is used in multiple places in the planner. That does not mean
it should be encouraged. We want to get rid of most of this after Spark 4.0.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]