You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2025/08/21 04:40:10 UTC
Re: [PR] [SPARK-52448][CONNECT] Add simplified Struct Expression.Literal [spark]
zhengruifeng commented on code in PR #51561:
URL: https://github.com/apache/spark/pull/51561#discussion_r2289834569
##########
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:
@heyihong sorry for the late comments, what about introducing a new message for this purpose?
for example, `SimplifiedStruct` or `LightStruct`, my feeling is that the conversion in the server side become too complex
--
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