jhorstmann commented on a change in pull request #788:
URL: https://github.com/apache/arrow-datafusion/pull/788#discussion_r680916545



##########
File path: datafusion/src/scalar.rs
##########
@@ -65,8 +65,9 @@ pub enum ScalarValue {
     Binary(Option<Vec<u8>>),
     /// large binary
     LargeBinary(Option<Vec<u8>>),
-    /// list of nested ScalarValue
-    List(Option<Vec<ScalarValue>>, DataType),
+    /// list of nested ScalarValue (boxed to reduce size_of(ScalarValue))
+    #[allow(clippy::box_vec)]
+    List(Option<Box<Vec<ScalarValue>>>, Box<DataType>),

Review comment:
       `Box<[ScalarValue]>` via `Vec::into_boxed_slice` would also be an option 
and would remove one pointer indirection, with the downside that data would 
need to be copied if the vec has excess capacity. @alamb do you think this 
would be worth exploring? I could prepare a PR since I already started looking 
to the usages.




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


Reply via email to