grundprinzip commented on code in PR #38800:
URL: https://github.com/apache/spark/pull/38800#discussion_r1032152539


##########
connector/connect/src/main/protobuf/spark/connect/expressions.proto:
##########
@@ -83,29 +84,20 @@ message Expression {
     // directly declare the type variation).
     uint32 type_variation_reference = 51;
 
-    message VarChar {
-      string value = 1;
-      uint32 length = 2;
-    }
-
     message Decimal {
-      // little-endian twos-complement integer representation of complete value
-      // (ignoring precision) Always 16 bytes in length
-      bytes value = 1;
+      // the string representation.
+      string value = 1;
       // The maximum number of digits allowed in the value.
       // the maximum precision is 38.
-      int32 precision = 2;
+      optional int32 precision = 2;
       // declared scale of decimal literal
-      int32 scale = 3;
+      optional int32 scale = 3;
     }
 
-    message Map {
-      message KeyValue {
-        Literal key = 1;
-        Literal value = 2;
-      }
-
-      repeated KeyValue key_values = 1;
+    message CalendarInterval {
+      int32 months = 1;
+      int32 days = 2;
+      int64 microseconds = 3;
     }
 
     message IntervalYearToMonth {

Review Comment:
   if you're removing the reference above, please remove it here as well.



##########
connector/connect/src/main/protobuf/spark/connect/expressions.proto:
##########
@@ -40,36 +40,37 @@ message Expression {
 
   message Literal {
     oneof literal_type {
-      bool boolean = 1;
-      int32 i8 = 2;
-      int32 i16 = 3;
-      int32 i32 = 5;
-      int64 i64 = 7;
-      float fp32 = 10;
-      double fp64 = 11;
-      string string = 12;
-      bytes binary = 13;
-      // Timestamp in units of microseconds since the UNIX epoch.
-      int64 timestamp = 14;
+      bool null = 1;
+      bytes binary = 2;
+      bool boolean = 3;
+
+      int32 byte = 4;
+      int32 short = 5;
+      int32 integer = 6;
+      int64 long = 7;
+      float float = 10;
+      double double = 11;
+      Decimal decimal = 12;
+
+      string string = 13;
+
       // Date in units of days since the UNIX epoch.
       int32 date = 16;
-      // Time in units of microseconds past midnight
-      int64 time = 17;

Review Comment:
   this is the ``datetime.time`?



##########
connector/connect/src/main/protobuf/spark/connect/expressions.proto:
##########
@@ -40,36 +40,37 @@ message Expression {
 
   message Literal {
     oneof literal_type {
-      bool boolean = 1;
-      int32 i8 = 2;
-      int32 i16 = 3;
-      int32 i32 = 5;
-      int64 i64 = 7;
-      float fp32 = 10;
-      double fp64 = 11;
-      string string = 12;
-      bytes binary = 13;
-      // Timestamp in units of microseconds since the UNIX epoch.
-      int64 timestamp = 14;
+      bool null = 1;
+      bytes binary = 2;
+      bool boolean = 3;
+
+      int32 byte = 4;
+      int32 short = 5;
+      int32 integer = 6;
+      int64 long = 7;
+      float float = 10;
+      double double = 11;
+      Decimal decimal = 12;
+
+      string string = 13;
+
       // Date in units of days since the UNIX epoch.
       int32 date = 16;
-      // Time in units of microseconds past midnight
-      int64 time = 17;
-      IntervalYearToMonth interval_year_to_month = 19;
-      IntervalDayToSecond interval_day_to_second = 20;
-      string fixed_char = 21;
-      VarChar var_char = 22;
-      bytes fixed_binary = 23;
-      Decimal decimal = 24;
-      Struct struct = 25;
-      Map map = 26;
       // Timestamp in units of microseconds since the UNIX epoch.
-      int64 timestamp_tz = 27;
+      int64 timestamp = 17;
+      // Timestamp in units of microseconds since the UNIX epoch (without 
timezone information).
+      int64 timestamp_ntz = 18;
+
+      CalendarInterval calendar_interval = 19;
+      int32 year_month_interval = 20;
+      int64 day_time_interval = 21;
+
+      Array array = 22;
+      Struct struct = 23;
+      Map map = 24;
+
       bytes uuid = 28;
-      DataType null = 29; // a typed null literal
-      List list = 30;
-      DataType.Array empty_array = 31;
-      DataType.Map empty_map = 32;

Review Comment:
   Please clean up the below elements as well, thank you!



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to