polars-df 0.15.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +274 -0
  3. data/Cargo.lock +1465 -867
  4. data/Cargo.toml +3 -0
  5. data/LICENSE.txt +2 -2
  6. data/README.md +87 -37
  7. data/ext/polars/Cargo.toml +47 -16
  8. data/ext/polars/src/c_api/allocator.rs +7 -0
  9. data/ext/polars/src/c_api/mod.rs +1 -0
  10. data/ext/polars/src/catalog/mod.rs +1 -0
  11. data/ext/polars/src/catalog/unity.rs +470 -0
  12. data/ext/polars/src/conversion/any_value.rs +99 -84
  13. data/ext/polars/src/conversion/categorical.rs +30 -0
  14. data/ext/polars/src/conversion/chunked_array.rs +71 -62
  15. data/ext/polars/src/conversion/datetime.rs +63 -0
  16. data/ext/polars/src/conversion/mod.rs +796 -312
  17. data/ext/polars/src/dataframe/construction.rs +6 -18
  18. data/ext/polars/src/dataframe/export.rs +30 -39
  19. data/ext/polars/src/dataframe/general.rs +294 -362
  20. data/ext/polars/src/dataframe/io.rs +33 -150
  21. data/ext/polars/src/dataframe/map.rs +175 -0
  22. data/ext/polars/src/dataframe/mod.rs +37 -5
  23. data/ext/polars/src/dataframe/serde.rs +23 -8
  24. data/ext/polars/src/error.rs +44 -7
  25. data/ext/polars/src/exceptions.rs +21 -8
  26. data/ext/polars/src/expr/array.rs +86 -22
  27. data/ext/polars/src/expr/binary.rs +50 -1
  28. data/ext/polars/src/expr/bitwise.rs +39 -0
  29. data/ext/polars/src/expr/categorical.rs +20 -0
  30. data/ext/polars/src/expr/datatype.rs +51 -0
  31. data/ext/polars/src/expr/datetime.rs +99 -41
  32. data/ext/polars/src/expr/extension.rs +12 -0
  33. data/ext/polars/src/expr/general.rs +252 -128
  34. data/ext/polars/src/expr/list.rs +56 -60
  35. data/ext/polars/src/expr/meta.rs +30 -35
  36. data/ext/polars/src/expr/mod.rs +28 -6
  37. data/ext/polars/src/expr/name.rs +29 -14
  38. data/ext/polars/src/expr/rolling.rs +111 -3
  39. data/ext/polars/src/expr/selector.rs +219 -0
  40. data/ext/polars/src/expr/serde.rs +28 -0
  41. data/ext/polars/src/expr/string.rs +118 -20
  42. data/ext/polars/src/expr/struct.rs +14 -1
  43. data/ext/polars/src/file.rs +194 -86
  44. data/ext/polars/src/functions/aggregation.rs +13 -12
  45. data/ext/polars/src/functions/business.rs +2 -3
  46. data/ext/polars/src/functions/eager.rs +3 -2
  47. data/ext/polars/src/functions/io.rs +90 -18
  48. data/ext/polars/src/functions/lazy.rs +267 -118
  49. data/ext/polars/src/functions/meta.rs +8 -7
  50. data/ext/polars/src/functions/misc.rs +1 -1
  51. data/ext/polars/src/functions/mod.rs +2 -1
  52. data/ext/polars/src/functions/range.rs +88 -31
  53. data/ext/polars/src/functions/strings.rs +6 -0
  54. data/ext/polars/src/functions/utils.rs +8 -0
  55. data/ext/polars/src/interop/arrow/mod.rs +52 -1
  56. data/ext/polars/src/interop/arrow/{to_ruby.rs → to_rb.rs} +37 -7
  57. data/ext/polars/src/interop/arrow/to_rust.rs +43 -0
  58. data/ext/polars/src/interop/numo/to_numo_df.rs +1 -1
  59. data/ext/polars/src/interop/numo/to_numo_series.rs +72 -50
  60. data/ext/polars/src/io/cloud_options.rs +107 -0
  61. data/ext/polars/src/io/mod.rs +4 -0
  62. data/ext/polars/src/io/scan_options.rs +113 -0
  63. data/ext/polars/src/io/sink_options.rs +46 -0
  64. data/ext/polars/src/io/sink_output.rs +21 -0
  65. data/ext/polars/src/lazyframe/exitable.rs +39 -0
  66. data/ext/polars/src/lazyframe/general.rs +846 -368
  67. data/ext/polars/src/lazyframe/mod.rs +58 -5
  68. data/ext/polars/src/lazyframe/optflags.rs +59 -0
  69. data/ext/polars/src/lazyframe/serde.rs +36 -4
  70. data/ext/polars/src/lazyframe/sink.rs +46 -0
  71. data/ext/polars/src/lazygroupby.rs +38 -9
  72. data/ext/polars/src/lib.rs +574 -165
  73. data/ext/polars/src/map/lazy.rs +44 -74
  74. data/ext/polars/src/map/mod.rs +18 -254
  75. data/ext/polars/src/map/series.rs +241 -1087
  76. data/ext/polars/src/on_startup.rs +192 -9
  77. data/ext/polars/src/prelude.rs +1 -0
  78. data/ext/polars/src/rb_modules.rs +10 -57
  79. data/ext/polars/src/ruby/exceptions.rs +26 -0
  80. data/ext/polars/src/ruby/gvl.rs +104 -0
  81. data/ext/polars/src/ruby/lazy.rs +46 -0
  82. data/ext/polars/src/ruby/mod.rs +11 -0
  83. data/ext/polars/src/ruby/numo.rs +52 -0
  84. data/ext/polars/src/ruby/plan_callback.rs +198 -0
  85. data/ext/polars/src/ruby/rb_modules.rs +16 -0
  86. data/ext/polars/src/ruby/ruby_convert_registry.rs +51 -0
  87. data/ext/polars/src/ruby/ruby_function.rs +11 -0
  88. data/ext/polars/src/ruby/ruby_udf.rs +164 -0
  89. data/ext/polars/src/ruby/thread.rs +65 -0
  90. data/ext/polars/src/ruby/utils.rs +39 -0
  91. data/ext/polars/src/series/aggregation.rs +116 -91
  92. data/ext/polars/src/series/arithmetic.rs +16 -22
  93. data/ext/polars/src/series/comparison.rs +101 -222
  94. data/ext/polars/src/series/construction.rs +80 -70
  95. data/ext/polars/src/series/export.rs +98 -56
  96. data/ext/polars/src/series/general.rs +323 -440
  97. data/ext/polars/src/series/import.rs +22 -5
  98. data/ext/polars/src/series/map.rs +103 -0
  99. data/ext/polars/src/series/mod.rs +57 -15
  100. data/ext/polars/src/series/scatter.rs +139 -82
  101. data/ext/polars/src/sql.rs +16 -9
  102. data/ext/polars/src/testing/frame.rs +31 -0
  103. data/ext/polars/src/testing/mod.rs +5 -0
  104. data/ext/polars/src/testing/series.rs +31 -0
  105. data/ext/polars/src/timeout.rs +105 -0
  106. data/ext/polars/src/utils.rs +105 -4
  107. data/lib/polars/array_expr.rb +500 -22
  108. data/lib/polars/array_name_space.rb +384 -10
  109. data/lib/polars/batched_csv_reader.rb +48 -66
  110. data/lib/polars/binary_expr.rb +217 -0
  111. data/lib/polars/binary_name_space.rb +155 -1
  112. data/lib/polars/cat_expr.rb +224 -0
  113. data/lib/polars/cat_name_space.rb +132 -32
  114. data/lib/polars/catalog/unity/catalog_info.rb +20 -0
  115. data/lib/polars/catalog/unity/column_info.rb +31 -0
  116. data/lib/polars/catalog/unity/namespace_info.rb +21 -0
  117. data/lib/polars/catalog/unity/table_info.rb +50 -0
  118. data/lib/polars/catalog.rb +448 -0
  119. data/lib/polars/collect_batches.rb +22 -0
  120. data/lib/polars/config.rb +3 -3
  121. data/lib/polars/convert.rb +201 -36
  122. data/lib/polars/data_frame.rb +2851 -1017
  123. data/lib/polars/data_frame_plot.rb +173 -0
  124. data/lib/polars/data_type_expr.rb +52 -0
  125. data/lib/polars/data_type_group.rb +6 -0
  126. data/lib/polars/data_types.rb +118 -18
  127. data/lib/polars/date_time_expr.rb +426 -84
  128. data/lib/polars/date_time_name_space.rb +384 -111
  129. data/lib/polars/dynamic_group_by.rb +102 -10
  130. data/lib/polars/exceptions.rb +50 -5
  131. data/lib/polars/expr.rb +2159 -915
  132. data/lib/polars/extension_expr.rb +39 -0
  133. data/lib/polars/extension_name_space.rb +39 -0
  134. data/lib/polars/functions/aggregation/horizontal.rb +11 -6
  135. data/lib/polars/functions/aggregation/vertical.rb +2 -3
  136. data/lib/polars/functions/as_datatype.rb +290 -8
  137. data/lib/polars/functions/business.rb +95 -0
  138. data/lib/polars/functions/col.rb +6 -5
  139. data/lib/polars/functions/datatype.rb +62 -0
  140. data/lib/polars/functions/eager.rb +426 -24
  141. data/lib/polars/functions/escape_regex.rb +21 -0
  142. data/lib/polars/functions/lazy.rb +813 -195
  143. data/lib/polars/functions/lit.rb +21 -10
  144. data/lib/polars/functions/range/int_range.rb +74 -2
  145. data/lib/polars/functions/range/linear_space.rb +195 -0
  146. data/lib/polars/functions/range/time_range.rb +1 -1
  147. data/lib/polars/functions/repeat.rb +7 -12
  148. data/lib/polars/functions/whenthen.rb +2 -2
  149. data/lib/polars/group_by.rb +188 -58
  150. data/lib/polars/iceberg_dataset.rb +108 -0
  151. data/lib/polars/in_process_query.rb +37 -0
  152. data/lib/polars/io/cloud.rb +18 -0
  153. data/lib/polars/io/csv.rb +336 -128
  154. data/lib/polars/io/database.rb +19 -4
  155. data/lib/polars/io/delta.rb +134 -0
  156. data/lib/polars/io/iceberg.rb +34 -0
  157. data/lib/polars/io/ipc.rb +63 -63
  158. data/lib/polars/io/json.rb +16 -0
  159. data/lib/polars/io/lines.rb +172 -0
  160. data/lib/polars/io/ndjson.rb +176 -20
  161. data/lib/polars/io/parquet.rb +173 -95
  162. data/lib/polars/io/scan_options.rb +55 -0
  163. data/lib/polars/io/sink_options.rb +27 -0
  164. data/lib/polars/io/utils.rb +17 -0
  165. data/lib/polars/lazy_frame.rb +3017 -622
  166. data/lib/polars/lazy_group_by.rb +436 -2
  167. data/lib/polars/list_expr.rb +551 -59
  168. data/lib/polars/list_name_space.rb +465 -51
  169. data/lib/polars/meta_expr.rb +146 -24
  170. data/lib/polars/name_expr.rb +87 -2
  171. data/lib/polars/query_opt_flags.rb +264 -0
  172. data/lib/polars/rolling_group_by.rb +90 -5
  173. data/lib/polars/scan_cast_options.rb +86 -0
  174. data/lib/polars/schema.rb +128 -0
  175. data/lib/polars/selector.rb +245 -0
  176. data/lib/polars/selectors.rb +1048 -201
  177. data/lib/polars/series.rb +2522 -774
  178. data/lib/polars/series_plot.rb +72 -0
  179. data/lib/polars/slice.rb +1 -1
  180. data/lib/polars/sql_context.rb +13 -6
  181. data/lib/polars/string_cache.rb +19 -72
  182. data/lib/polars/string_expr.rb +561 -107
  183. data/lib/polars/string_name_space.rb +781 -109
  184. data/lib/polars/struct_expr.rb +139 -18
  185. data/lib/polars/struct_name_space.rb +19 -1
  186. data/lib/polars/testing.rb +24 -273
  187. data/lib/polars/utils/constants.rb +2 -0
  188. data/lib/polars/utils/construction/data_frame.rb +410 -0
  189. data/lib/polars/utils/construction/series.rb +350 -0
  190. data/lib/polars/utils/construction/utils.rb +9 -0
  191. data/lib/polars/utils/convert.rb +18 -8
  192. data/lib/polars/utils/deprecation.rb +11 -0
  193. data/lib/polars/utils/parse.rb +62 -9
  194. data/lib/polars/utils/reduce_balanced.rb +43 -0
  195. data/lib/polars/utils/serde.rb +22 -0
  196. data/lib/polars/utils/unstable.rb +19 -0
  197. data/lib/polars/utils/various.rb +86 -1
  198. data/lib/polars/utils.rb +63 -48
  199. data/lib/polars/version.rb +1 -1
  200. data/lib/polars.rb +85 -2
  201. metadata +80 -28
  202. data/ext/polars/src/allocator.rs +0 -13
  203. data/ext/polars/src/batched_csv.rs +0 -138
  204. data/ext/polars/src/functions/string_cache.rs +0 -25
  205. data/ext/polars/src/map/dataframe.rs +0 -338
  206. data/lib/polars/plot.rb +0 -109
data/Cargo.toml CHANGED
@@ -4,3 +4,6 @@ resolver = "2"
4
4
 
5
5
  [profile.release]
6
6
  strip = true
7
+
8
+ [profile.dev]
9
+ strip = true
data/LICENSE.txt CHANGED
@@ -1,5 +1,5 @@
1
- Copyright (c) 2020 Ritchie Vink
2
- Copyright (c) 2022-2024 Andrew Kane
1
+ Copyright (c) 2025 Ritchie Vink
2
+ Copyright (c) 2022-2026 Andrew Kane
3
3
  Some portions Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Polars
2
2
 
3
- :fire: Blazingly fast DataFrames for Ruby, powered by [Polars](https://github.com/pola-rs/polars)
3
+ 🔥 Blazingly fast DataFrames for Ruby, powered by [Polars](https://github.com/pola-rs/polars)
4
4
 
5
5
  [![Build Status](https://github.com/ankane/ruby-polars/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/ruby-polars/actions)
6
6
 
@@ -14,7 +14,7 @@ gem "polars-df"
14
14
 
15
15
  ## Getting Started
16
16
 
17
- This library follows the [Polars Python API](https://pola-rs.github.io/polars/py-polars/html/reference/index.html).
17
+ This library follows the [Polars Python API](https://docs.pola.rs/api/python/stable/reference/index.html).
18
18
 
19
19
  ```ruby
20
20
  Polars.scan_csv("iris.csv")
@@ -24,7 +24,7 @@ Polars.scan_csv("iris.csv")
24
24
  .collect
25
25
  ```
26
26
 
27
- You can follow [Polars tutorials](https://pola-rs.github.io/polars-book/user-guide/) and convert the code to Ruby in many cases. Feel free to open an issue if you run into problems.
27
+ You can follow [Polars tutorials](https://docs.pola.rs/user-guide/getting-started/) and convert the code to Ruby in many cases. Feel free to open an issue if you run into problems.
28
28
 
29
29
  ## Reference
30
30
 
@@ -32,9 +32,7 @@ You can follow [Polars tutorials](https://pola-rs.github.io/polars-book/user-gui
32
32
  - [DataFrame](https://www.rubydoc.info/gems/polars-df/Polars/DataFrame)
33
33
  - [LazyFrame](https://www.rubydoc.info/gems/polars-df/Polars/LazyFrame)
34
34
 
35
- ## Examples
36
-
37
- ### Creating DataFrames
35
+ ## Creating DataFrames
38
36
 
39
37
  From a CSV
40
38
 
@@ -88,6 +86,21 @@ From Avro
88
86
  Polars.read_avro("file.avro")
89
87
  ```
90
88
 
89
+ From Iceberg (experimental, requires [iceberg](https://github.com/ankane/iceberg-ruby))
90
+
91
+ ```ruby
92
+ Polars.scan_iceberg(table)
93
+ ```
94
+
95
+ From Delta Lake (experimental, requires [deltalake-rb](https://github.com/ankane/delta-ruby))
96
+
97
+ ```ruby
98
+ Polars.read_delta("./table")
99
+
100
+ # or lazily with
101
+ Polars.scan_delta("./table")
102
+ ```
103
+
91
104
  From a hash
92
105
 
93
106
  ```ruby
@@ -167,20 +180,20 @@ df.tail
167
180
  Filter on a condition
168
181
 
169
182
  ```ruby
170
- df[Polars.col("a") == 2]
171
- df[Polars.col("a") != 2]
172
- df[Polars.col("a") > 2]
173
- df[Polars.col("a") >= 2]
174
- df[Polars.col("a") < 2]
175
- df[Polars.col("a") <= 2]
183
+ df.filter(Polars.col("a") == 2)
184
+ df.filter(Polars.col("a") != 2)
185
+ df.filter(Polars.col("a") > 2)
186
+ df.filter(Polars.col("a") >= 2)
187
+ df.filter(Polars.col("a") < 2)
188
+ df.filter(Polars.col("a") <= 2)
176
189
  ```
177
190
 
178
191
  And, or, and exclusive or
179
192
 
180
193
  ```ruby
181
- df[(Polars.col("a") > 1) & (Polars.col("b") == "two")] # and
182
- df[(Polars.col("a") > 1) | (Polars.col("b") == "two")] # or
183
- df[(Polars.col("a") > 1) ^ (Polars.col("b") == "two")] # xor
194
+ df.filter((Polars.col("a") > 1) & (Polars.col("b") == "two")) # and
195
+ df.filter((Polars.col("a") > 1) | (Polars.col("b") == "two")) # or
196
+ df.filter((Polars.col("a") > 1) ^ (Polars.col("b") == "two")) # xor
184
197
  ```
185
198
 
186
199
  ## Operations
@@ -225,9 +238,9 @@ Trigonometric functions
225
238
  df["a"].sin
226
239
  df["a"].cos
227
240
  df["a"].tan
228
- df["a"].asin
229
- df["a"].acos
230
- df["a"].atan
241
+ df["a"].arcsin
242
+ df["a"].arccos
243
+ df["a"].arctan
231
244
  ```
232
245
 
233
246
  Hyperbolic functions
@@ -236,9 +249,9 @@ Hyperbolic functions
236
249
  df["a"].sinh
237
250
  df["a"].cosh
238
251
  df["a"].tanh
239
- df["a"].asinh
240
- df["a"].acosh
241
- df["a"].atanh
252
+ df["a"].arcsinh
253
+ df["a"].arccosh
254
+ df["a"].arctanh
242
255
  ```
243
256
 
244
257
  Summary statistics
@@ -313,7 +326,7 @@ df.to_dummies
313
326
  Array of hashes
314
327
 
315
328
  ```ruby
316
- df.rows(named: true)
329
+ df.to_a
317
330
  ```
318
331
 
319
332
  Hash of series
@@ -336,6 +349,38 @@ Parquet
336
349
  df.write_parquet("file.parquet")
337
350
  ```
338
351
 
352
+ JSON
353
+
354
+ ```ruby
355
+ df.write_json("file.json")
356
+ # or
357
+ df.write_ndjson("file.ndjson")
358
+ ```
359
+
360
+ Feather / Arrow IPC
361
+
362
+ ```ruby
363
+ df.write_ipc("file.arrow")
364
+ ```
365
+
366
+ Avro
367
+
368
+ ```ruby
369
+ df.write_avro("file.avro")
370
+ ```
371
+
372
+ Iceberg (experimental)
373
+
374
+ ```ruby
375
+ df.write_iceberg(table, mode: "append")
376
+ ```
377
+
378
+ Delta Lake (experimental)
379
+
380
+ ```ruby
381
+ df.write_delta("./table")
382
+ ```
383
+
339
384
  Numo array
340
385
 
341
386
  ```ruby
@@ -353,13 +398,14 @@ Polars::DataFrame.new(data, schema: {"a" => Polars::Int32, "b" => Polars::Float3
353
398
  Supported types are:
354
399
 
355
400
  - boolean - `Boolean`
356
- - float - `Float64`, `Float32`
357
- - integer - `Int64`, `Int32`, `Int16`, `Int8`
358
- - unsigned integer - `UInt64`, `UInt32`, `UInt16`, `UInt8`
359
- - string - `String`, `Binary`, `Categorical`
360
- - temporal - `Date`, `Datetime`, `Time`, `Duration`
361
- - nested - `List`, `Struct`, `Array`
362
- - other - `Object`, `Null`
401
+ - decimal - `Decimal`
402
+ - float - `Float16`, `Float32`, `Float64`
403
+ - integer - `Int8`, `Int16`, `Int32`, `Int64`, `Int128`
404
+ - unsigned integer - `UInt8`, `UInt16`, `UInt32`, `UInt64`, `UInt128`
405
+ - string - `String`, `Categorical`, `Enum`
406
+ - temporal - `Date`, `Datetime`, `Duration`, `Time`
407
+ - nested - `Array`, `List`, `Struct`
408
+ - other - `Binary`, `Object`, `Null`, `Unknown`
363
409
 
364
410
  Get column types
365
411
 
@@ -390,30 +436,34 @@ gem "vega"
390
436
  And use:
391
437
 
392
438
  ```ruby
393
- df.plot("a", "b")
439
+ df.plot.line("a", "b")
394
440
  ```
395
441
 
396
- Specify the chart type (`line`, `pie`, `column`, `bar`, `area`, or `scatter`)
442
+ Supports `line`, `pie`, `column`, `bar`, `area`, and `scatter` plots
443
+
444
+ Group data
397
445
 
398
446
  ```ruby
399
- df.plot("a", "b", type: "pie")
447
+ df.plot.line("a", "b", color: "c")
400
448
  ```
401
449
 
402
- Group data
450
+ Stacked columns or bars
403
451
 
404
452
  ```ruby
405
- df.group_by("c").plot("a", "b")
453
+ df.plot.column("a", "b", color: "c", stacked: true)
406
454
  ```
407
455
 
408
- Stacked columns or bars
456
+ Plot a series
409
457
 
410
458
  ```ruby
411
- df.group_by("c").plot("a", "b", stacked: true)
459
+ df["a"].plot.hist
412
460
  ```
413
461
 
462
+ Supports `hist`, `kde`, and `line` plots
463
+
414
464
  ## History
415
465
 
416
- View the [changelog](CHANGELOG.md)
466
+ View the [changelog](https://github.com/ankane/ruby-polars/blob/master/CHANGELOG.md)
417
467
 
418
468
  ## Contributing
419
469
 
@@ -1,42 +1,58 @@
1
1
  [package]
2
- name = "polars"
3
- version = "0.15.0"
2
+ name = "polars-ruby"
3
+ version = "0.26.0"
4
4
  license = "MIT"
5
5
  authors = ["Andrew Kane <andrew@ankane.org>"]
6
- edition = "2021"
7
- rust-version = "1.80.0"
6
+ edition = "2024"
7
+ rust-version = "1.89.0"
8
8
  publish = false
9
9
 
10
10
  [lib]
11
+ name = "polars"
11
12
  crate-type = ["cdylib"]
12
13
 
13
14
  [dependencies]
14
15
  ahash = "0.8"
15
- arrow = { package = "polars-arrow", version = "=0.44.2" }
16
+ arrow = { package = "polars-arrow", version = "=0.54.4" }
16
17
  bytes = "1"
17
18
  chrono = "0.4"
19
+ chrono-tz = "0.10"
18
20
  either = "1.8"
19
- magnus = "0.7"
20
- polars-core = "=0.44.2"
21
- polars-plan = "=0.44.2"
22
- polars-parquet = "=0.44.2"
23
- polars-utils = "=0.44.2"
21
+ magnus = { version = "0.8", features = ["chrono"] }
22
+ num-traits = "0.2"
23
+ parking_lot = "0.12"
24
+ polars-buffer = "=0.54.4"
25
+ polars-compute = "=0.54.4"
26
+ polars-config = "=0.54.4"
27
+ polars-core = "=0.54.4"
28
+ polars-dtype = "=0.54.4"
29
+ polars-error = "=0.54.4"
30
+ polars-io = "=0.54.4"
31
+ polars-lazy = { version = "=0.54.4", features = ["catalog"] }
32
+ polars-ops = "=0.54.4"
33
+ polars-plan = "=0.54.4"
34
+ polars-parquet = "=0.54.4"
35
+ polars-testing = "=0.54.4"
36
+ polars-utils = "=0.54.4"
37
+ rayon = "1.9"
38
+ rb-sys = "0.9"
24
39
  regex = "1"
25
40
  serde_json = "1"
26
41
 
27
42
  [dependencies.polars]
28
- version = "=0.44.2"
43
+ version = "=0.54.4"
29
44
  features = [
30
45
  "abs",
31
46
  "approx_unique",
32
47
  "arg_where",
33
- "array_any_all",
34
48
  "array_count",
49
+ "array_to_struct",
35
50
  "asof_join",
36
51
  "avro",
37
52
  "aws",
38
53
  "azure",
39
54
  "binary_encoding",
55
+ "bitwise",
40
56
  "business",
41
57
  "cloud",
42
58
  "concat_str",
@@ -50,7 +66,9 @@ features = [
50
66
  "dataframe_arithmetic",
51
67
  "diagonal_concat",
52
68
  "diff",
69
+ "dot_diagram",
53
70
  "dot_product",
71
+ "dtype-extension",
54
72
  "dtype-full",
55
73
  "dynamic_group_by",
56
74
  "ewma",
@@ -60,23 +78,28 @@ features = [
60
78
  "find_many",
61
79
  "fmt",
62
80
  "gcp",
81
+ "hist",
63
82
  "http",
83
+ "iejoin",
84
+ "index_of",
64
85
  "interpolate",
86
+ "interpolate_by",
65
87
  "ipc",
66
88
  "ipc_streaming",
67
89
  "is_between",
90
+ "is_close",
68
91
  "is_first_distinct",
69
92
  "is_in",
70
93
  "is_last_distinct",
71
94
  "is_unique",
72
95
  "json",
73
96
  "lazy",
74
- "list_any_all",
75
97
  "list_count",
76
98
  "list_drop_nulls",
77
99
  "list_eval",
78
100
  "list_gather",
79
101
  "list_sample",
102
+ "list_sets",
80
103
  "list_to_struct",
81
104
  "log",
82
105
  "merge_sorted",
@@ -107,6 +130,7 @@ features = [
107
130
  "rolling_window_by",
108
131
  "round_series",
109
132
  "row_hash",
133
+ "scan_lines",
110
134
  "search_sorted",
111
135
  "semi_anti_join",
112
136
  "serde-lazy",
@@ -123,8 +147,15 @@ features = [
123
147
  "unique_counts",
124
148
  ]
125
149
 
150
+ # allocators differ from Python due to issues with cross-compilation
151
+ # Windows cross-compilation requires libmimalloc-sys <= 0.1.38, so skip for now
152
+ # https://github.com/purpleprotocol/mimalloc_rust/issues/125
153
+ [target.'cfg(target_os = "macos")'.dependencies]
154
+ mimalloc = { version = "0.1", default-features = false }
155
+
126
156
  [target.'cfg(target_os = "linux")'.dependencies]
127
- jemallocator = { version = "0.5", features = ["disable_initial_exec_tls"] }
157
+ tikv-jemallocator = { version = "0.7", features = ["disable_initial_exec_tls"] }
128
158
 
129
- [target.'cfg(not(any(target_os = "linux", target_os = "windows")))'.dependencies]
130
- mimalloc = { version = "0.1", default-features = false }
159
+ [features]
160
+ default = []
161
+ serialize_binary = []
@@ -0,0 +1,7 @@
1
+ #[cfg(target_os = "linux")]
2
+ #[global_allocator]
3
+ static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
4
+
5
+ #[cfg(target_os = "macos")]
6
+ #[global_allocator]
7
+ static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
@@ -0,0 +1 @@
1
+ pub mod allocator;
@@ -0,0 +1 @@
1
+ pub mod unity;