rroonga 10.0.1 → 11.0.6

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 (51) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -0
  3. data/Rakefile +30 -28
  4. data/doc/text/news.md +51 -5
  5. data/doc/text/tutorial.md +1 -1
  6. data/ext/groonga/extconf.rb +18 -3
  7. data/ext/groonga/rb-grn-accessor.c +2 -2
  8. data/ext/groonga/rb-grn-column-cache.c +3 -3
  9. data/ext/groonga/rb-grn-column.c +4 -4
  10. data/ext/groonga/rb-grn-context.c +82 -58
  11. data/ext/groonga/rb-grn-data-column.c +4 -4
  12. data/ext/groonga/rb-grn-database.c +45 -26
  13. data/ext/groonga/rb-grn-double-array-trie.c +2 -2
  14. data/ext/groonga/rb-grn-encoding-support.c +2 -2
  15. data/ext/groonga/rb-grn-exception.c +14 -0
  16. data/ext/groonga/rb-grn-expression-builder.c +3 -3
  17. data/ext/groonga/rb-grn-expression.c +3 -3
  18. data/ext/groonga/rb-grn-fix-size-column.c +2 -2
  19. data/ext/groonga/rb-grn-flushable.c +2 -1
  20. data/ext/groonga/rb-grn-hash.c +2 -2
  21. data/ext/groonga/rb-grn-index-column.c +3 -3
  22. data/ext/groonga/rb-grn-index-cursor.c +2 -2
  23. data/ext/groonga/rb-grn-inverted-index-cursor.c +3 -3
  24. data/ext/groonga/rb-grn-object.c +30 -9
  25. data/ext/groonga/rb-grn-operator.c +100 -259
  26. data/ext/groonga/rb-grn-patricia-trie.c +2 -2
  27. data/ext/groonga/rb-grn-plugin.c +34 -22
  28. data/ext/groonga/rb-grn-request-timer-id.c +2 -2
  29. data/ext/groonga/rb-grn-snippet.c +3 -3
  30. data/ext/groonga/rb-grn-table-cursor-key-support.c +2 -2
  31. data/ext/groonga/rb-grn-table-cursor.c +3 -3
  32. data/ext/groonga/rb-grn-table-key-support.c +6 -4
  33. data/ext/groonga/rb-grn-table.c +63 -45
  34. data/ext/groonga/rb-grn-type.c +5 -1
  35. data/ext/groonga/rb-grn-utils.c +17 -1
  36. data/ext/groonga/rb-grn-variable-size-column.c +2 -2
  37. data/ext/groonga/rb-grn-variable.c +2 -2
  38. data/ext/groonga/rb-grn.h +10 -5
  39. data/ext/groonga/rb-groonga.c +6 -2
  40. data/lib/groonga/context.rb +32 -0
  41. data/rroonga-build.rb +5 -4
  42. data/rroonga.gemspec +5 -2
  43. data/test/groonga-test-utils.rb +9 -0
  44. data/test/run-test.rb +1 -1
  45. data/test/test-column.rb +12 -1
  46. data/test/test-index-column.rb +3 -3
  47. data/test/test-logger.rb +2 -0
  48. data/test/test-ractor.rb +65 -0
  49. data/test/test-remote.rb +16 -0
  50. data/test/test-table-arrow.rb +20 -11
  51. metadata +84 -68
data/test/test-remote.rb CHANGED
@@ -26,6 +26,7 @@ class RemoteTest < Test::Unit::TestCase
26
26
  else
27
27
  package_config = PKGConfig.package_config("groonga")
28
28
  groonga = package_config.variable("groonga")
29
+ groonga = normalize_groonga_path(groonga)
29
30
  groonga = "groonga" unless File.exist?(groonga)
30
31
  end
31
32
 
@@ -51,6 +52,19 @@ class RemoteTest < Test::Unit::TestCase
51
52
  end
52
53
  end
53
54
 
55
+ def normalize_groonga_path(groonga)
56
+ return groonga unless groonga
57
+ return groonga unless Object.const_defined?(:RubyInstaller)
58
+
59
+ msys2_installation = RubyInstaller::Runtime.msys2_installation
60
+ mingw_prefix = msys2_installation.mingw_prefix
61
+ mingw_bin_path = "#{mingw_prefix}/bin/"
62
+ mingw_bin_path_windows = "#{msys2_installation.mingw_bin_path}\\"
63
+ groonga.gsub(/\A#{Regexp.escape(mingw_bin_path)}/) do
64
+ mingw_bin_path_windows
65
+ end
66
+ end
67
+
54
68
  teardown
55
69
  def teardown_remote_connection
56
70
  if @process_id
@@ -78,6 +92,8 @@ class RemoteTest < Test::Unit::TestCase
78
92
  id, result = _context.receive
79
93
  assert_equal(0, id)
80
94
  values = JSON.load(result)
95
+ values.delete("apache_arrow")
96
+ values.delete("features")
81
97
  assert_equal([
82
98
  "alloc_count",
83
99
  "cache_hit_rate",
@@ -20,8 +20,14 @@ class TableArrowTest < Test::Unit::TestCase
20
20
  setup_database
21
21
 
22
22
  omit("Apache Arrow support is required") unless context.support_arrow?
23
- if (Groonga::VERSION[0, 3] <=> [9, 1, 2]) <= 0
24
- omit("Groonga 9.1.2 is buggy")
23
+ end
24
+
25
+ def open_temporary_file(extension)
26
+ tempfile = Tempfile.new(["table-arrow", extension])
27
+ begin
28
+ yield(tempfile)
29
+ ensure
30
+ tempfile.close!
25
31
  end
26
32
  end
27
33
 
@@ -45,9 +51,10 @@ class TableArrowTest < Test::Unit::TestCase
45
51
  source.add(:data => data)
46
52
  end
47
53
 
48
- tempfile = Tempfile.new(["table-arrow", ".arrow"])
49
- source.dump_arrow(tempfile.path)
50
- destination.load_arrow(tempfile.path)
54
+ open_temporary_file(".arrow") do |tempfile|
55
+ source.dump_arrow(tempfile.path)
56
+ destination.load_arrow(tempfile.path)
57
+ end
51
58
 
52
59
  assert_equal(expected,
53
60
  destination.collect(&:attributes))
@@ -156,9 +163,10 @@ class TableArrowTest < Test::Unit::TestCase
156
163
  source.add(:data1 => data1, :data2 => data2)
157
164
  end
158
165
 
159
- tempfile = Tempfile.new(["table-arrow", ".arrow"])
160
- source.dump_arrow(tempfile.path, :columns => source.columns[0, 1])
161
- destination.load_arrow(tempfile.path)
166
+ open_temporary_file(".arrow") do |tempfile|
167
+ source.dump_arrow(tempfile.path, columns: source.columns[0, 1])
168
+ destination.load_arrow(tempfile.path)
169
+ end
162
170
 
163
171
  assert_equal(expected,
164
172
  destination.collect(&:attributes))
@@ -186,9 +194,10 @@ class TableArrowTest < Test::Unit::TestCase
186
194
  source.add(:data1 => data1, :data2 => data2)
187
195
  end
188
196
 
189
- tempfile = Tempfile.new(["table-arrow", ".arrow"])
190
- source.dump_arrow(tempfile.path, :column_names => ["data1"])
191
- destination.load_arrow(tempfile.path)
197
+ open_temporary_file(".arrow") do |tempfile|
198
+ source.dump_arrow(tempfile.path, column_names: ["data1"])
199
+ destination.load_arrow(tempfile.path)
200
+ end
192
201
 
193
202
  assert_equal(expected,
194
203
  destination.collect(&:attributes))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rroonga
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.0.1
4
+ version: 11.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
@@ -12,10 +12,24 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2020-04-06 00:00:00.000000000 Z
15
+ date: 2021-09-24 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
- name: pkg-config
18
+ name: groonga-client
19
+ requirement: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.3
24
+ type: :runtime
25
+ prerelease: false
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ version: 0.0.3
31
+ - !ruby/object:Gem::Dependency
32
+ name: json
19
33
  requirement: !ruby/object:Gem::Requirement
20
34
  requirements:
21
35
  - - ">="
@@ -29,21 +43,21 @@ dependencies:
29
43
  - !ruby/object:Gem::Version
30
44
  version: '0'
31
45
  - !ruby/object:Gem::Dependency
32
- name: groonga-client
46
+ name: native-package-installer
33
47
  requirement: !ruby/object:Gem::Requirement
34
48
  requirements:
35
49
  - - ">="
36
50
  - !ruby/object:Gem::Version
37
- version: 0.0.3
51
+ version: '0'
38
52
  type: :runtime
39
53
  prerelease: false
40
54
  version_requirements: !ruby/object:Gem::Requirement
41
55
  requirements:
42
56
  - - ">="
43
57
  - !ruby/object:Gem::Version
44
- version: 0.0.3
58
+ version: '0'
45
59
  - !ruby/object:Gem::Dependency
46
- name: json
60
+ name: pkg-config
47
61
  requirement: !ruby/object:Gem::Requirement
48
62
  requirements:
49
63
  - - ">="
@@ -152,9 +166,9 @@ email:
152
166
  - y.hayamizu@gmail.com
153
167
  - dara@shidara.net
154
168
  executables:
155
- - groonga-database-inspect
156
169
  - grndump
157
170
  - grntest-log-analyze
171
+ - groonga-database-inspect
158
172
  - groonga-index-dump
159
173
  extensions:
160
174
  - ext/groonga/extconf.rb
@@ -322,6 +336,7 @@ files:
322
336
  - test/test-plugin.rb
323
337
  - test/test-procedure.rb
324
338
  - test/test-query-logger.rb
339
+ - test/test-ractor.rb
325
340
  - test/test-record.rb
326
341
  - test/test-remote.rb
327
342
  - test/test-request-canceler.rb
@@ -355,7 +370,7 @@ homepage: http://ranguba.org/#about-rroonga
355
370
  licenses:
356
371
  - LGPL-2.1
357
372
  metadata:
358
- msys2_mingw_dependencies: groonga
373
+ msys2_mingw_dependencies: groonga>=11.0.0
359
374
  post_install_message:
360
375
  rdoc_options: []
361
376
  require_paths:
@@ -372,79 +387,80 @@ required_rubygems_version: !ruby/object:Gem::Requirement
372
387
  - !ruby/object:Gem::Version
373
388
  version: '0'
374
389
  requirements: []
375
- rubygems_version: 3.1.2
390
+ rubygems_version: 3.3.0.dev
376
391
  signing_key:
377
392
  specification_version: 4
378
393
  summary: Ruby bindings for Groonga that provide full text search and column store
379
394
  features.
380
395
  test_files:
381
- - test/test-request-canceler.rb
382
- - test/test-convert.rb
383
- - test/test-table-select.rb
384
- - test/test-table-dumper.rb
385
- - test/test-table.rb
386
- - test/test-thread.rb
387
- - test/test-gqtp.rb
388
- - test/test-geo-point.rb
389
- - test/test-variable.rb
390
- - test/test-operator.rb
391
- - test/test-table-select-mecab.rb
392
- - test/test-version.rb
393
- - test/test-patricia-trie.rb
394
- - test/test-context.rb
395
- - test/test-table-traverse.rb
396
- - test/test-memory-pool.rb
396
+ - test/groonga-test-utils.rb
397
+ - test/run-test.rb
398
+ - test/test-accessor.rb
399
+ - test/test-array.rb
400
+ - test/test-column-cache.rb
401
+ - test/test-column.rb
402
+ - test/test-command-select.rb
397
403
  - test/test-config.rb
404
+ - test/test-context.rb
405
+ - test/test-convert.rb
398
406
  - test/test-data-column.rb
399
- - test/test-table-offset-and-limit.rb
400
- - test/test-variable-size-column.rb
401
- - test/test-fix-size-column.rb
402
- - test/test-database.rb
403
- - test/test-token-regexp.rb
404
- - test/test-schema-dumper.rb
407
+ - test/test-database-dumper.rb
405
408
  - test/test-database-inspector.rb
406
- - test/test-logger.rb
407
- - test/test-windows-event-logger.rb
408
- - test/test-package-label.rb
409
- - test/test-flushable.rb
410
- - test/test-expression-builder.rb
411
- - test/test-table-arrow.rb
412
- - test/groonga-test-utils.rb
413
- - test/test-array.rb
414
- - test/test-procedure.rb
415
- - test/test-index-cursor.rb
416
- - test/test-lock-timeout.rb
409
+ - test/test-database.rb
410
+ - test/test-default-cache.rb
417
411
  - test/test-double-array-trie.rb
418
- - test/test-exception.rb
419
- - test/test-accessor.rb
420
- - test/test-schema-create-table.rb
421
- - test/run-test.rb
422
- - test/test-column-cache.rb
423
- - test/test-request-timer.rb
424
- - test/test-sub-records.rb
425
- - test/test-normalizer.rb
412
+ - test/test-encoding.rb
426
413
  - test/test-error-message.rb
427
- - test/test-type.rb
428
- - test/test-table-select-normalize.rb
429
- - test/test-snippet.rb
414
+ - test/test-exception.rb
415
+ - test/test-expression-builder.rb
416
+ - test/test-expression.rb
417
+ - test/test-fix-size-column.rb
418
+ - test/test-flushable.rb
419
+ - test/test-geo-point.rb
420
+ - test/test-gqtp.rb
421
+ - test/test-hash.rb
422
+ - test/test-id.rb
430
423
  - test/test-index-column.rb
431
- - test/test-query-logger.rb
432
- - test/test-column.rb
424
+ - test/test-index-cursor.rb
425
+ - test/test-lock-timeout.rb
426
+ - test/test-logger.rb
427
+ - test/test-memory-pool.rb
433
428
  - test/test-name.rb
434
- - test/test-table-select-weight.rb
429
+ - test/test-normalizer.rb
430
+ - test/test-operator.rb
431
+ - test/test-package-label.rb
435
432
  - test/test-pagination.rb
436
- - test/test-vector-column.rb
437
- - test/test-default-cache.rb
438
- - test/test-id.rb
439
- - test/test-schema.rb
433
+ - test/test-patricia-trie.rb
440
434
  - test/test-plugin.rb
441
- - test/test-table-group.rb
435
+ - test/test-procedure.rb
436
+ - test/test-query-logger.rb
437
+ - test/test-ractor.rb
442
438
  - test/test-record.rb
443
- - test/test-expression.rb
444
- - test/test-table-key-support.rb
445
439
  - test/test-remote.rb
446
- - test/test-encoding.rb
447
- - test/test-database-dumper.rb
448
- - test/test-command-select.rb
449
- - test/test-hash.rb
440
+ - test/test-request-canceler.rb
441
+ - test/test-request-timer.rb
442
+ - test/test-schema-create-table.rb
443
+ - test/test-schema-dumper.rb
450
444
  - test/test-schema-type.rb
445
+ - test/test-schema.rb
446
+ - test/test-snippet.rb
447
+ - test/test-sub-records.rb
448
+ - test/test-table-arrow.rb
449
+ - test/test-table-dumper.rb
450
+ - test/test-table-group.rb
451
+ - test/test-table-key-support.rb
452
+ - test/test-table-offset-and-limit.rb
453
+ - test/test-table-select-mecab.rb
454
+ - test/test-table-select-normalize.rb
455
+ - test/test-table-select-weight.rb
456
+ - test/test-table-select.rb
457
+ - test/test-table-traverse.rb
458
+ - test/test-table.rb
459
+ - test/test-thread.rb
460
+ - test/test-token-regexp.rb
461
+ - test/test-type.rb
462
+ - test/test-variable-size-column.rb
463
+ - test/test-variable.rb
464
+ - test/test-vector-column.rb
465
+ - test/test-version.rb
466
+ - test/test-windows-event-logger.rb