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/11/09 08:24:31 UTC

[GitHub] [spark] zhengruifeng commented on a diff in pull request #38578: [SPARK-41064][CONNECT][PYTHON] Implement `DataFrame.crosstab` and `DataFrame.stat.crosstab`

zhengruifeng commented on code in PR #38578:
URL: https://github.com/apache/spark/pull/38578#discussion_r1017594955


##########
connector/connect/src/test/scala/org/apache/spark/sql/connect/planner/SparkConnectProtoSuite.scala:
##########
@@ -267,6 +267,12 @@ class SparkConnectProtoSuite extends PlanTest with SparkConnectPlanTest {
       sparkTestRelation.summary("count", "mean", "stddev"))
   }
 
+  test("Test crosstab") {
+    comparePlans(
+      connectTestRelation.crosstab("id", "name"),
+      sparkTestRelation.stat.crosstab("id", "name"))

Review Comment:
   good point



##########
connector/connect/src/main/protobuf/spark/connect/relations.proto:
##########
@@ -272,5 +273,13 @@ message StatFunction {
   message Summary {
     repeated string statistics = 1;
   }
+
+  // StatFunctions.crossTabulate
+  message CrossTabulate {

Review Comment:
   nice, will update



-- 
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