Skip to content

Commit 92899a7

Browse files
committed
Adapt heapsize for &str and add another scalarvalue
1 parent ca6434b commit 92899a7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

datafusion/common/src/heap_size.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ impl DFHeapSize for ScalarValue {
125125
DurationNanosecond(d) => d.heap_size(),
126126
Union(a, b, c) => a.heap_size() + b.heap_size() + c.heap_size(),
127127
Dictionary(a, b) => a.heap_size() + b.heap_size(),
128+
RunEndEncoded(a, b, c) => a.heap_size() + b.heap_size() + c.heap_size(),
128129
}
129130
}
130131
}
@@ -314,7 +315,7 @@ impl DFHeapSize for String {
314315

315316
impl DFHeapSize for str {
316317
fn heap_size(&self) -> usize {
317-
self.as_bytes().len()
318+
self.len()
318319
}
319320
}
320321

0 commit comments

Comments
 (0)