adriangb commented on code in PR #21750:
URL: https://github.com/apache/datafusion/pull/21750#discussion_r3112996393
##########
datafusion/physical-plan/src/spill/mod.rs:
##########
@@ -1421,4 +1421,94 @@ mod tests {
Ok(())
}
+
+ #[tokio::test]
+ async fn test_spill_file_size_gc_verification_string_view() -> Result<()> {
+ use arrow::array::StringViewArray;
+ use std::fs;
+
+ // 1. Setup bloated data (large buffers)
+ let num_rows = 1000;
+ let strings: Vec<String> = (0..num_rows)
+ .map(|i|
format!("this_is_a_long_string_to_ensure_it_is_not_inlined_and_causes_waste_{i}"))
+ .collect();
+ let string_array = StringViewArray::from(strings);
Review Comment:
Since we don't need this later I wonder if we can avoid the allocation by
feeding an iterator into the StringView or at least drop it immediately to free
up memory.
--
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]