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/21 11:28:31 UTC
[GitHub] [spark] zhengruifeng commented on a diff in pull request #38318: [SPARK-40852][CONNECT][PYTHON] Introduce `DataFrameFunction` in proto and implement `DataFrame.summary`
zhengruifeng commented on code in PR #38318:
URL: https://github.com/apache/spark/pull/38318#discussion_r1001680211
##########
connector/connect/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala:
##########
@@ -93,6 +96,19 @@ class SparkConnectPlanner(plan: proto.Relation, session: SparkSession) {
transformRelation(rel.getInput))
}
+ private def transformDataFrameFunction(rel: proto.DataFrameFunction): LogicalPlan = {
+ val child = transformRelation(rel.getInput)
+
+ rel.getFunctionCase match {
+ case proto.DataFrameFunction.FunctionCase.SUMMARY =>
+ StatFunctions
+ .summary(Dataset.ofRows(session, child), rel.getSummary.getStatisticsList.asScala.toSeq)
Review Comment:
yes, then it will have more optimization space. let us add new plan for it. thanks
--
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