red-arrow 0.17.1 → 4.0.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 (72) hide show
  1. checksums.yaml +4 -4
  2. data/ext/arrow/converters.hpp +75 -32
  3. data/ext/arrow/extconf.rb +14 -3
  4. data/ext/arrow/raw-records.cpp +3 -1
  5. data/ext/arrow/values.cpp +3 -1
  6. data/lib/arrow/array-builder.rb +11 -6
  7. data/lib/arrow/array.rb +118 -0
  8. data/lib/arrow/bigdecimal-extension.rb +5 -1
  9. data/lib/arrow/buffer.rb +28 -0
  10. data/lib/arrow/data-type.rb +14 -5
  11. data/lib/arrow/decimal128-array-builder.rb +21 -25
  12. data/lib/arrow/decimal128-data-type.rb +2 -0
  13. data/lib/arrow/decimal128.rb +18 -0
  14. data/lib/arrow/decimal256-array-builder.rb +61 -0
  15. data/lib/arrow/decimal256-array.rb +25 -0
  16. data/lib/arrow/decimal256-data-type.rb +73 -0
  17. data/lib/arrow/decimal256.rb +60 -0
  18. data/lib/arrow/dense-union-data-type.rb +2 -2
  19. data/lib/arrow/dictionary-array.rb +24 -0
  20. data/lib/arrow/dictionary-data-type.rb +2 -2
  21. data/lib/arrow/fixed-size-binary-array-builder.rb +38 -0
  22. data/lib/arrow/fixed-size-binary-array.rb +26 -0
  23. data/lib/arrow/loader.rb +18 -0
  24. data/lib/arrow/raw-table-converter.rb +47 -0
  25. data/lib/arrow/record-batch-iterator.rb +22 -0
  26. data/lib/arrow/record-batch.rb +9 -1
  27. data/lib/arrow/sort-key.rb +193 -0
  28. data/lib/arrow/sort-options.rb +109 -0
  29. data/lib/arrow/sparse-union-data-type.rb +2 -2
  30. data/lib/arrow/struct-array-builder.rb +13 -7
  31. data/lib/arrow/table-saver.rb +6 -6
  32. data/lib/arrow/table.rb +5 -24
  33. data/lib/arrow/time32-data-type.rb +2 -2
  34. data/lib/arrow/time64-data-type.rb +2 -2
  35. data/lib/arrow/timestamp-data-type.rb +2 -2
  36. data/lib/arrow/version.rb +1 -1
  37. data/red-arrow.gemspec +1 -0
  38. data/test/raw-records/test-basic-arrays.rb +17 -0
  39. data/test/raw-records/test-dense-union-array.rb +15 -34
  40. data/test/raw-records/test-list-array.rb +20 -0
  41. data/test/raw-records/test-sparse-union-array.rb +15 -33
  42. data/test/raw-records/test-struct-array.rb +15 -0
  43. data/test/test-array.rb +122 -2
  44. data/test/test-bigdecimal.rb +20 -3
  45. data/test/test-buffer.rb +11 -0
  46. data/test/test-decimal128-array-builder.rb +18 -1
  47. data/test/test-decimal128-data-type.rb +2 -2
  48. data/test/test-decimal128.rb +38 -0
  49. data/test/test-decimal256-array-builder.rb +112 -0
  50. data/test/test-decimal256-array.rb +38 -0
  51. data/test/test-decimal256-data-type.rb +31 -0
  52. data/test/test-decimal256.rb +102 -0
  53. data/test/test-dense-union-data-type.rb +2 -2
  54. data/test/test-dictionary-array.rb +41 -0
  55. data/test/test-feather.rb +1 -1
  56. data/test/test-fixed-size-binary-array-builder.rb +92 -0
  57. data/test/test-fixed-size-binary-array.rb +36 -0
  58. data/test/test-orc.rb +19 -23
  59. data/test/test-record-batch-iterator.rb +37 -0
  60. data/test/test-record-batch.rb +14 -0
  61. data/test/test-sort-indices.rb +40 -0
  62. data/test/test-sort-key.rb +81 -0
  63. data/test/test-sort-options.rb +58 -0
  64. data/test/test-sparse-union-data-type.rb +2 -2
  65. data/test/test-struct-array-builder.rb +16 -12
  66. data/test/test-struct-array.rb +2 -2
  67. data/test/values/test-basic-arrays.rb +11 -0
  68. data/test/values/test-dense-union-array.rb +15 -34
  69. data/test/values/test-list-array.rb +18 -0
  70. data/test/values/test-sparse-union-array.rb +15 -33
  71. data/test/values/test-struct-array.rb +15 -0
  72. metadata +107 -59
@@ -326,6 +326,21 @@ module ValuesStructArrayTests
326
326
  assert_equal(values, target.values)
327
327
  end
328
328
 
329
+ def test_decimal256
330
+ values = [
331
+ {"field" => BigDecimal("92.92")},
332
+ nil,
333
+ {"field" => nil},
334
+ ]
335
+ target = build({
336
+ type: :decimal256,
337
+ precision: 38,
338
+ scale: 2,
339
+ },
340
+ values)
341
+ assert_equal(values, target.values)
342
+ end
343
+
329
344
  def test_list
330
345
  values = [
331
346
  {"field" => [true, nil, false]},
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: red-arrow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.1
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Apache Arrow Developers
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-18 00:00:00.000000000 Z
11
+ date: 2021-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bigdecimal
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 2.0.3
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 2.0.3
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: extpp
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -192,6 +206,7 @@ files:
192
206
  - lib/arrow/array.rb
193
207
  - lib/arrow/bigdecimal-extension.rb
194
208
  - lib/arrow/block-closable.rb
209
+ - lib/arrow/buffer.rb
195
210
  - lib/arrow/chunked-array.rb
196
211
  - lib/arrow/column-containable.rb
197
212
  - lib/arrow/column.rb
@@ -207,11 +222,18 @@ files:
207
222
  - lib/arrow/decimal128-array.rb
208
223
  - lib/arrow/decimal128-data-type.rb
209
224
  - lib/arrow/decimal128.rb
225
+ - lib/arrow/decimal256-array-builder.rb
226
+ - lib/arrow/decimal256-array.rb
227
+ - lib/arrow/decimal256-data-type.rb
228
+ - lib/arrow/decimal256.rb
210
229
  - lib/arrow/dense-union-data-type.rb
230
+ - lib/arrow/dictionary-array.rb
211
231
  - lib/arrow/dictionary-data-type.rb
212
232
  - lib/arrow/field-containable.rb
213
233
  - lib/arrow/field.rb
214
234
  - lib/arrow/file-output-stream.rb
235
+ - lib/arrow/fixed-size-binary-array-builder.rb
236
+ - lib/arrow/fixed-size-binary-array.rb
215
237
  - lib/arrow/generic-filterable.rb
216
238
  - lib/arrow/generic-takeable.rb
217
239
  - lib/arrow/group.rb
@@ -221,8 +243,10 @@ files:
221
243
  - lib/arrow/null-array-builder.rb
222
244
  - lib/arrow/null-array.rb
223
245
  - lib/arrow/path-extension.rb
246
+ - lib/arrow/raw-table-converter.rb
224
247
  - lib/arrow/record-batch-builder.rb
225
248
  - lib/arrow/record-batch-file-reader.rb
249
+ - lib/arrow/record-batch-iterator.rb
226
250
  - lib/arrow/record-batch-stream-reader.rb
227
251
  - lib/arrow/record-batch.rb
228
252
  - lib/arrow/record-containable.rb
@@ -230,6 +254,8 @@ files:
230
254
  - lib/arrow/rolling-window.rb
231
255
  - lib/arrow/schema.rb
232
256
  - lib/arrow/slicer.rb
257
+ - lib/arrow/sort-key.rb
258
+ - lib/arrow/sort-options.rb
233
259
  - lib/arrow/sparse-union-data-type.rb
234
260
  - lib/arrow/struct-array-builder.rb
235
261
  - lib/arrow/struct-array.rb
@@ -288,11 +314,18 @@ files:
288
314
  - test/test-decimal128-array.rb
289
315
  - test/test-decimal128-data-type.rb
290
316
  - test/test-decimal128.rb
317
+ - test/test-decimal256-array-builder.rb
318
+ - test/test-decimal256-array.rb
319
+ - test/test-decimal256-data-type.rb
320
+ - test/test-decimal256.rb
291
321
  - test/test-dense-union-data-type.rb
322
+ - test/test-dictionary-array.rb
292
323
  - test/test-dictionary-data-type.rb
293
324
  - test/test-feather.rb
294
325
  - test/test-field.rb
295
326
  - test/test-file-output-stream.rb
327
+ - test/test-fixed-size-binary-array-builder.rb
328
+ - test/test-fixed-size-binary-array.rb
296
329
  - test/test-group.rb
297
330
  - test/test-list-array-builder.rb
298
331
  - test/test-list-array.rb
@@ -301,10 +334,14 @@ files:
301
334
  - test/test-orc.rb
302
335
  - test/test-record-batch-builder.rb
303
336
  - test/test-record-batch-file-reader.rb
337
+ - test/test-record-batch-iterator.rb
304
338
  - test/test-record-batch.rb
305
339
  - test/test-rolling-window.rb
306
340
  - test/test-schema.rb
307
341
  - test/test-slicer.rb
342
+ - test/test-sort-indices.rb
343
+ - test/test-sort-key.rb
344
+ - test/test-sort-options.rb
308
345
  - test/test-sparse-union-data-type.rb
309
346
  - test/test-struct-array-builder.rb
310
347
  - test/test-struct-array.rb
@@ -327,8 +364,8 @@ homepage: https://arrow.apache.org/
327
364
  licenses:
328
365
  - Apache-2.0
329
366
  metadata:
330
- msys2_mingw_dependencies: arrow>=0.17.1
331
- post_install_message:
367
+ msys2_mingw_dependencies: arrow>=4.0.0
368
+ post_install_message:
332
369
  rdoc_options: []
333
370
  require_paths:
334
371
  - lib
@@ -343,77 +380,88 @@ required_rubygems_version: !ruby/object:Gem::Requirement
343
380
  - !ruby/object:Gem::Version
344
381
  version: '0'
345
382
  requirements: []
346
- rubygems_version: 3.1.2
347
- signing_key:
383
+ rubygems_version: 3.2.15
384
+ signing_key:
348
385
  specification_version: 4
349
386
  summary: Red Arrow is the Ruby bindings of Apache Arrow
350
387
  test_files:
351
- - test/test-orc.rb
352
- - test/test-file-output-stream.rb
353
- - test/test-dense-union-data-type.rb
354
- - test/test-record-batch-builder.rb
355
- - test/test-record-batch.rb
356
- - test/test-list-data-type.rb
357
- - test/test-decimal128.rb
358
- - test/test-chunked-array.rb
359
- - test/test-array.rb
360
- - test/test-null-array.rb
361
- - test/test-struct-array-builder.rb
362
- - test/test-table.rb
363
- - test/test-decimal128-data-type.rb
364
388
  - test/fixture/TestOrcFile.test1.orc
389
+ - test/fixture/float-integer.csv
365
390
  - test/fixture/integer-float.csv
366
391
  - test/fixture/null-with-double-quote.csv
392
+ - test/fixture/null-without-double-quote.csv
393
+ - test/fixture/with-header-float.csv
367
394
  - test/fixture/with-header.csv
368
- - test/fixture/without-header.csv
369
395
  - test/fixture/without-header-float.csv
370
- - test/fixture/with-header-float.csv
371
- - test/fixture/null-without-double-quote.csv
372
- - test/fixture/float-integer.csv
373
- - test/run-test.rb
374
- - test/test-group.rb
396
+ - test/fixture/without-header.csv
397
+ - test/helper/fixture.rb
398
+ - test/helper/omittable.rb
375
399
  - test/helper.rb
376
- - test/test-time64-array.rb
377
- - test/test-csv-loader.rb
378
- - test/test-feather.rb
379
- - test/test-time64-data-type.rb
380
- - test/values/test-sparse-union-array.rb
381
- - test/values/test-basic-arrays.rb
382
- - test/values/test-dense-union-array.rb
383
- - test/values/test-list-array.rb
384
- - test/values/test-struct-array.rb
385
- - test/test-struct-data-type.rb
386
- - test/test-date64-array.rb
387
- - test/raw-records/test-sparse-union-array.rb
388
- - test/raw-records/test-multiple-columns.rb
389
400
  - test/raw-records/test-basic-arrays.rb
390
- - test/raw-records/test-table.rb
391
401
  - test/raw-records/test-dense-union-array.rb
392
402
  - test/raw-records/test-list-array.rb
403
+ - test/raw-records/test-multiple-columns.rb
404
+ - test/raw-records/test-sparse-union-array.rb
393
405
  - test/raw-records/test-struct-array.rb
394
- - test/test-list-array.rb
395
- - test/test-timestamp-data-type.rb
396
- - test/test-timestamp-array.rb
397
- - test/test-data-type.rb
406
+ - test/raw-records/test-table.rb
407
+ - test/run-test.rb
398
408
  - test/test-array-builder.rb
399
- - test/test-time32-data-type.rb
400
- - test/test-record-batch-file-reader.rb
401
- - test/test-rolling-window.rb
402
- - test/test-list-array-builder.rb
403
- - test/test-slicer.rb
404
- - test/test-decimal128-array-builder.rb
405
- - test/test-schema.rb
406
- - test/test-time.rb
407
- - test/test-column.rb
409
+ - test/test-array.rb
408
410
  - test/test-bigdecimal.rb
409
- - test/test-sparse-union-data-type.rb
410
- - test/test-tensor.rb
411
- - test/test-time32-array.rb
412
411
  - test/test-buffer.rb
412
+ - test/test-chunked-array.rb
413
+ - test/test-column.rb
414
+ - test/test-csv-loader.rb
415
+ - test/test-data-type.rb
416
+ - test/test-date32-array.rb
417
+ - test/test-date64-array.rb
418
+ - test/test-decimal128-array-builder.rb
413
419
  - test/test-decimal128-array.rb
414
- - test/helper/omittable.rb
415
- - test/helper/fixture.rb
420
+ - test/test-decimal128-data-type.rb
421
+ - test/test-decimal128.rb
422
+ - test/test-decimal256-array-builder.rb
423
+ - test/test-decimal256-array.rb
424
+ - test/test-decimal256-data-type.rb
425
+ - test/test-decimal256.rb
426
+ - test/test-dense-union-data-type.rb
427
+ - test/test-dictionary-array.rb
416
428
  - test/test-dictionary-data-type.rb
417
- - test/test-date32-array.rb
429
+ - test/test-feather.rb
418
430
  - test/test-field.rb
431
+ - test/test-file-output-stream.rb
432
+ - test/test-fixed-size-binary-array-builder.rb
433
+ - test/test-fixed-size-binary-array.rb
434
+ - test/test-group.rb
435
+ - test/test-list-array-builder.rb
436
+ - test/test-list-array.rb
437
+ - test/test-list-data-type.rb
438
+ - test/test-null-array.rb
439
+ - test/test-orc.rb
440
+ - test/test-record-batch-builder.rb
441
+ - test/test-record-batch-file-reader.rb
442
+ - test/test-record-batch-iterator.rb
443
+ - test/test-record-batch.rb
444
+ - test/test-rolling-window.rb
445
+ - test/test-schema.rb
446
+ - test/test-slicer.rb
447
+ - test/test-sort-indices.rb
448
+ - test/test-sort-key.rb
449
+ - test/test-sort-options.rb
450
+ - test/test-sparse-union-data-type.rb
451
+ - test/test-struct-array-builder.rb
419
452
  - test/test-struct-array.rb
453
+ - test/test-struct-data-type.rb
454
+ - test/test-table.rb
455
+ - test/test-tensor.rb
456
+ - test/test-time.rb
457
+ - test/test-time32-array.rb
458
+ - test/test-time32-data-type.rb
459
+ - test/test-time64-array.rb
460
+ - test/test-time64-data-type.rb
461
+ - test/test-timestamp-array.rb
462
+ - test/test-timestamp-data-type.rb
463
+ - test/values/test-basic-arrays.rb
464
+ - test/values/test-dense-union-array.rb
465
+ - test/values/test-list-array.rb
466
+ - test/values/test-sparse-union-array.rb
467
+ - test/values/test-struct-array.rb