heyihong commented on code in PR #51561:
URL: https://github.com/apache/spark/pull/51561#discussion_r2293950991


##########
sql/connect/common/src/main/protobuf/spark/connect/expressions.proto:
##########
@@ -227,8 +227,21 @@ message Expression {
     }
 
     message Struct {
-      DataType struct_type = 1;
+      // (Deprecated) The type of the struct.
+      //
+      // This field is deprecated since Spark 4.1+ because using DataType as 
the type of a struct
+      // is ambiguous. This field should only be set if the data_type_struct 
field is not set.
+      // Use data_type_struct field instead.
+      DataType struct_type = 1 [deprecated = true];
+
+      // (Required) The literal values that make up the struct elements.
       repeated Literal elements = 2;
+
+      // The type of the struct.
+      //
+      // Whether data_type_struct.fields.data_type should be set depends on
+      // whether each field's type can be inferred from the elements field.
+      DataType.Struct data_type_struct = 3;

Review Comment:
   @zhengruifeng FYI, I simplified the implementation in this PR: 
https://github.com/apache/spark/pull/52098
   , but it's not necessary to introduce a new message.



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