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


##########
connector/connect/common/src/main/protobuf/spark/connect/types.proto:
##########
@@ -184,3 +184,15 @@ message DataType {
     DataType sql_type = 5;
   }
 }
+
+enum StorageLevel {

Review Comment:
   the problem is that the definitions are different between PySpark and SQL:
   
   PySpark: `MEMORY_AND_DISK = useDisk=True, useMemory=True, useOffHeap=False, 
deserialized=False`
   SQL: `MEMORY_AND_DISK = _useDisk=true, _useMemory=true, _useOffHeap=false, 
_deserialized=true`
   
   also `MEMORY_AND_DISK_DESER ` was dedicated for PySpark, it is equivalent to 
`MEMORY_AND_DISK` in Scala side.
   
   cc @cloud-fan @HyukjinKwon @amaliujia 
   
   also please follow [the 
guide](https://protobuf.dev/programming-guides/style/#enums) to define an 
`enum`, it should be like:
   ```
   enum StorageLevel {
       STORAGE_LEVEL_UNSPECIFIED = 0;
       STORAGE_LEVEL_ DISK_ONLY = 1;
      ...
   ```



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