@@ -1102,14 +1102,14 @@ namespace duckdb_datasketches
11021102 {
11031103 auto sketch = datasketches::quantiles_sketch<T>::deserialize (sketch_data.GetDataUnsafe (), sketch_data.GetSize ());
11041104
1105- T *passing_points = (T *)duckdb_malloc (sizeof (T) * split_points_data.length );
1105+ T *passing_points = (T *)malloc (sizeof (T) * split_points_data.length );
11061106 for (idx_t i = 0 ; i < split_points_data.length ; i++)
11071107 {
11081108 passing_points[i] = split_points_list_children_data[i + split_points_data.offset ];
11091109 }
11101110
11111111 auto cdf_result = sketch.get_CDF (passing_points, split_points_data.length , inclusive_data);
1112- duckdb_free (passing_points);
1112+ free (passing_points);
11131113 auto current_size = ListVector::GetListSize (result);
11141114 auto new_size = current_size + cdf_result.size ();
11151115 if (ListVector::GetListCapacity (result) < new_size)
@@ -1159,14 +1159,14 @@ namespace duckdb_datasketches
11591159 {
11601160 auto sketch = datasketches::quantiles_sketch<T>::deserialize (sketch_data.GetDataUnsafe (), sketch_data.GetSize ());
11611161
1162- T *passing_points = (T *)duckdb_malloc (sizeof (T) * split_points_data.length );
1162+ T *passing_points = (T *)malloc (sizeof (T) * split_points_data.length );
11631163 for (idx_t i = 0 ; i < split_points_data.length ; i++)
11641164 {
11651165 passing_points[i] = split_points_list_children_data[i + split_points_data.offset ];
11661166 }
11671167
11681168 auto pmf_result = sketch.get_PMF (passing_points, split_points_data.length , inclusive_data);
1169- duckdb_free (passing_points);
1169+ free (passing_points);
11701170
11711171 auto current_size = ListVector::GetListSize (result);
11721172 auto new_size = current_size + pmf_result.size ();
@@ -2080,14 +2080,14 @@ namespace duckdb_datasketches
20802080 {
20812081 auto sketch = datasketches::kll_sketch<T>::deserialize (sketch_data.GetDataUnsafe (), sketch_data.GetSize ());
20822082
2083- T *passing_points = (T *)duckdb_malloc (sizeof (T) * split_points_data.length );
2083+ T *passing_points = (T *)malloc (sizeof (T) * split_points_data.length );
20842084 for (idx_t i = 0 ; i < split_points_data.length ; i++)
20852085 {
20862086 passing_points[i] = split_points_list_children_data[i + split_points_data.offset ];
20872087 }
20882088
20892089 auto cdf_result = sketch.get_CDF (passing_points, split_points_data.length , inclusive_data);
2090- duckdb_free (passing_points);
2090+ free (passing_points);
20912091 auto current_size = ListVector::GetListSize (result);
20922092 auto new_size = current_size + cdf_result.size ();
20932093 if (ListVector::GetListCapacity (result) < new_size)
@@ -2137,14 +2137,14 @@ namespace duckdb_datasketches
21372137 {
21382138 auto sketch = datasketches::kll_sketch<T>::deserialize (sketch_data.GetDataUnsafe (), sketch_data.GetSize ());
21392139
2140- T *passing_points = (T *)duckdb_malloc (sizeof (T) * split_points_data.length );
2140+ T *passing_points = (T *)malloc (sizeof (T) * split_points_data.length );
21412141 for (idx_t i = 0 ; i < split_points_data.length ; i++)
21422142 {
21432143 passing_points[i] = split_points_list_children_data[i + split_points_data.offset ];
21442144 }
21452145
21462146 auto pmf_result = sketch.get_PMF (passing_points, split_points_data.length , inclusive_data);
2147- duckdb_free (passing_points);
2147+ free (passing_points);
21482148
21492149 auto current_size = ListVector::GetListSize (result);
21502150 auto new_size = current_size + pmf_result.size ();
@@ -3058,14 +3058,14 @@ namespace duckdb_datasketches
30583058 {
30593059 auto sketch = datasketches::req_sketch<T>::deserialize (sketch_data.GetDataUnsafe (), sketch_data.GetSize ());
30603060
3061- T *passing_points = (T *)duckdb_malloc (sizeof (T) * split_points_data.length );
3061+ T *passing_points = (T *)malloc (sizeof (T) * split_points_data.length );
30623062 for (idx_t i = 0 ; i < split_points_data.length ; i++)
30633063 {
30643064 passing_points[i] = split_points_list_children_data[i + split_points_data.offset ];
30653065 }
30663066
30673067 auto cdf_result = sketch.get_CDF (passing_points, split_points_data.length , inclusive_data);
3068- duckdb_free (passing_points);
3068+ free (passing_points);
30693069 auto current_size = ListVector::GetListSize (result);
30703070 auto new_size = current_size + cdf_result.size ();
30713071 if (ListVector::GetListCapacity (result) < new_size)
@@ -3115,14 +3115,14 @@ namespace duckdb_datasketches
31153115 {
31163116 auto sketch = datasketches::req_sketch<T>::deserialize (sketch_data.GetDataUnsafe (), sketch_data.GetSize ());
31173117
3118- T *passing_points = (T *)duckdb_malloc (sizeof (T) * split_points_data.length );
3118+ T *passing_points = (T *)malloc (sizeof (T) * split_points_data.length );
31193119 for (idx_t i = 0 ; i < split_points_data.length ; i++)
31203120 {
31213121 passing_points[i] = split_points_list_children_data[i + split_points_data.offset ];
31223122 }
31233123
31243124 auto pmf_result = sketch.get_PMF (passing_points, split_points_data.length , inclusive_data);
3125- duckdb_free (passing_points);
3125+ free (passing_points);
31263126
31273127 auto current_size = ListVector::GetListSize (result);
31283128 auto new_size = current_size + pmf_result.size ();
@@ -3981,14 +3981,14 @@ namespace duckdb_datasketches
39813981 {
39823982 auto sketch = datasketches::tdigest<T>::deserialize (sketch_data.GetDataUnsafe (), sketch_data.GetSize ());
39833983
3984- T *passing_points = (T *)duckdb_malloc (sizeof (T) * split_points_data.length );
3984+ T *passing_points = (T *)malloc (sizeof (T) * split_points_data.length );
39853985 for (idx_t i = 0 ; i < split_points_data.length ; i++)
39863986 {
39873987 passing_points[i] = split_points_list_children_data[i + split_points_data.offset ];
39883988 }
39893989
39903990 auto cdf_result = sketch.get_CDF (passing_points, split_points_data.length );
3991- duckdb_free (passing_points);
3991+ free (passing_points);
39923992 auto current_size = ListVector::GetListSize (result);
39933993 auto new_size = current_size + cdf_result.size ();
39943994 if (ListVector::GetListCapacity (result) < new_size)
@@ -4037,14 +4037,14 @@ namespace duckdb_datasketches
40374037 {
40384038 auto sketch = datasketches::tdigest<T>::deserialize (sketch_data.GetDataUnsafe (), sketch_data.GetSize ());
40394039
4040- T *passing_points = (T *)duckdb_malloc (sizeof (T) * split_points_data.length );
4040+ T *passing_points = (T *)malloc (sizeof (T) * split_points_data.length );
40414041 for (idx_t i = 0 ; i < split_points_data.length ; i++)
40424042 {
40434043 passing_points[i] = split_points_list_children_data[i + split_points_data.offset ];
40444044 }
40454045
40464046 auto pmf_result = sketch.get_PMF (passing_points, split_points_data.length );
4047- duckdb_free (passing_points);
4047+ free (passing_points);
40484048
40494049 auto current_size = ListVector::GetListSize (result);
40504050 auto new_size = current_size + pmf_result.size ();
0 commit comments