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/11 18:52:31 UTC

[GitHub] [spark] amaliujia commented on a diff in pull request #38621: [SPARK-41111][CONNECT][PYTHON] Implement `DataFrame.show`

amaliujia commented on code in PR #38621:
URL: https://github.com/apache/spark/pull/38621#discussion_r1020483723


##########
connector/connect/src/main/protobuf/spark/connect/relations.proto:
##########
@@ -253,6 +254,23 @@ message Repartition {
   bool shuffle = 3;
 }
 
+// Compose the string representing rows for output.
+// It will invoke 'Dataset.showString' to compute the results.
+message ShowString {
+  // (Required). The input relation.
+  Relation input = 1;
+
+  // (Required) Number of rows to show.

Review Comment:
   I think we should have a proto message style guide soon that people agree.
   
   For example required field with `optional` notion is very confusing.
   
   IMO required field does not need `optional` to know set/unset. We say it is required which means clients should always offer a value. Server side just use the value. 
   
   



##########
connector/connect/src/main/protobuf/spark/connect/relations.proto:
##########
@@ -253,6 +254,23 @@ message Repartition {
   bool shuffle = 3;
 }
 
+// Compose the string representing rows for output.
+// It will invoke 'Dataset.showString' to compute the results.
+message ShowString {
+  // (Required). The input relation.
+  Relation input = 1;
+
+  // (Required) Number of rows to show.

Review Comment:
   I think we should have a proto message style guide ASAP that people agree.
   
   For example required field with `optional` notion is very confusing.
   
   IMO required field does not need `optional` to know set/unset. We say it is required which means clients should always offer a value. Server side just use the value. 
   
   



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