From 8bae819b48d356f6abf40e29701a9fd7f01eac95 Mon Sep 17 00:00:00 2001 From: Ritchie Vink Date: Wed, 18 May 2022 08:54:47 +0200 Subject: [PATCH] Improve list builders, iteration and construction (#3419) * list namespace to polars-ops * Improve list builders, iteration and construction - Greatly improves performance of the list builders by: https://github.com/jorgecarleitao/arrow2/pull/991 - List builders now also support nested dtypes like List and Struct - Python DataFrame and Series constructor now support better nested dtype construction * fix tests and fix struct::agg_list --- nodejs-polars/src/list_construction.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodejs-polars/src/list_construction.rs b/nodejs-polars/src/list_construction.rs index b581b4f7..085672f3 100644 --- a/nodejs-polars/src/list_construction.rs +++ b/nodejs-polars/src/list_construction.rs @@ -135,7 +135,7 @@ pub fn js_arr_to_list(name: &str, arr: &Array, dtype: &DataType) -> napi::Result builder.finish().into_series() } DataType::Datetime(_, _) => { - let mut builder = ListPrimitiveChunkedBuilder::::new( + let mut builder = ListPrimitiveChunkedBuilder::::new( name, len as usize, (len as usize) * 5,