groonga-command 1.4.7 → 1.4.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0516f0f80a6af2fefb12d10390e6f314ecf88e08f1cafc3abc942c92e13a23b
4
- data.tar.gz: 67eb82831789e515f65f153d9dd6b2833b0b364b4d80befdb04013ca7343caf2
3
+ metadata.gz: db7a5707522535c4fa87ad7160ef88d7e565955966ffcd2a2095ee002ae5ebf8
4
+ data.tar.gz: 422962c60a3e33d66c6348c6e39054d9389a3b645886bc627cb6d88bd377e8d6
5
5
  SHA512:
6
- metadata.gz: e6771fb6bd7beab7ac173819a9164d810240372a2caad156c3b34d86a45d3a79549fda55e2a86aaba17040640fdede581ef3b878f79870ba3bf588f4d0388d88
7
- data.tar.gz: 96d88ac9df80ab87c3df8537a0f6280d851cd24af476fc04ccd6439e46f91a80a01ee59c6e0511c8d340cdaabebd1ecfcf651bc16e3d7b3a769997d8e8187048
6
+ metadata.gz: b2ddb7d2c79f215b1f41d9806782352aca990c954844b54af486b37c71cbeb0f8a80e34046dc919133b66f9f0e28726f61af325145e233edd74cfabc967c57aa
7
+ data.tar.gz: d13d857186cccf9ca8cda06d400a1955d7c3d416f149610c22a7f0d784e7a9e5c9e56150074e38fabf9ecef5977394a6b9a4700e16041b44cf6e67045cf3f859
data/doc/text/news.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # News
2
2
 
3
+ ## 1.4.8: 2020-05-03
4
+
5
+ ### Improvements
6
+
7
+ * {Groonga::Command::Load#build_arrow_table}: Added support for
8
+ float32 weight vector.
9
+
3
10
  ## 1.4.7: 2020-01-10
4
11
 
5
12
  ### Improvements
@@ -181,8 +181,8 @@ module Groonga
181
181
  data_type ||= :string
182
182
  arrow_array = build_arrow_array(data_type, raw_array)
183
183
  when Hash
184
- arrow_array = build_arrow_array(arrow_weight_vector_data_type,
185
- raw_array)
184
+ data_type = arrow_weight_vector_data_type(sample)
185
+ arrow_array = build_arrow_array(data_type, raw_array)
186
186
  else
187
187
  data_type = detect_arrow_data_type(raw_array) || :string
188
188
  if data_type == :string
@@ -226,9 +226,14 @@ module Groonga
226
226
  Arrow::ListArrayBuilder.build(arrow_list_data_type, raw_array)
227
227
  end
228
228
 
229
- def arrow_weight_vector_data_type
229
+ def arrow_weight_vector_data_type(raw_value)
230
+ if raw_value.values.any? {|value| value.is_a?(Float)}
231
+ weight_type = :float
232
+ else
233
+ weight_type = :int32
234
+ end
230
235
  Arrow::StructDataType.new("value" => :string,
231
- "weight" => :int32)
236
+ "weight" => weight_type)
232
237
  end
233
238
 
234
239
  def detect_arrow_data_type(raw_array)
@@ -249,8 +254,8 @@ module Groonga
249
254
  type = nil if type == :int64
250
255
  type ||= :double
251
256
  when Hash
252
- arrow_list_field =
253
- Arrow::Field.new("item", arrow_weight_vector_data_type)
257
+ item_type = arrow_weight_vector_data_type(element)
258
+ arrow_list_field = Arrow::Field.new("item", item_type)
254
259
  arrow_list_data_type = Arrow::ListDataType.new(arrow_list_field)
255
260
  return arrow_list_data_type
256
261
  else
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Groonga
18
18
  module Command
19
- VERSION = "1.4.7"
19
+ VERSION = "1.4.8"
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groonga-command
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.7
4
+ version: 1.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-10 00:00:00.000000000 Z
11
+ date: 2020-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -287,66 +287,65 @@ required_rubygems_version: !ruby/object:Gem::Requirement
287
287
  - !ruby/object:Gem::Version
288
288
  version: '0'
289
289
  requirements: []
290
- rubyforge_project:
291
- rubygems_version: 2.7.6.2
290
+ rubygems_version: 3.2.0.pre1
292
291
  signing_key:
293
292
  specification_version: 4
294
293
  summary: Groonga-command is a library that represents [Groonga](http://groonga.org/)'s
295
294
  command. You can write a program that handle Groonga's command by using groonga-command.
296
295
  test_files:
297
- - test/run-test.rb
298
- - test/command/test-range-filter.rb
296
+ - test/command/format/test-command.rb
297
+ - test/command/test-base.rb
298
+ - test/command/test-column-copy.rb
299
+ - test/command/test-column-create.rb
300
+ - test/command/test-column-list.rb
301
+ - test/command/test-column-remove.rb
299
302
  - test/command/test-column-rename.rb
300
- - test/command/test-object-exist.rb
303
+ - test/command/test-config-delete.rb
301
304
  - test/command/test-config-get.rb
302
- - test/command/test-table-create.rb
303
- - test/command/test-plugin-register.rb
304
- - test/command/test-query-log-flags-remove.rb
305
- - test/command/format/test-command.rb
306
- - test/command/test-table-rename.rb
307
- - test/command/test-truncate.rb
305
+ - test/command/test-config-set.rb
306
+ - test/command/test-delete.rb
307
+ - test/command/test-dump.rb
308
+ - test/command/test-get.rb
309
+ - test/command/test-index-column-diff.rb
310
+ - test/command/test-io-flush.rb
311
+ - test/command/test-load.rb
312
+ - test/command/test-log-level.rb
308
313
  - test/command/test-log-put.rb
309
- - test/command/test-query-log-flags-get.rb
310
- - test/command/test-query-log-flags-set.rb
314
+ - test/command/test-logical-count.rb
311
315
  - test/command/test-logical-range-filter.rb
312
- - test/command/test-column-list.rb
313
- - test/command/test-ruby-load.rb
314
- - test/command/test-query-log-flags-add.rb
315
- - test/command/test-table-copy.rb
316
- - test/command/test-config-delete.rb
317
316
  - test/command/test-logical-select.rb
318
- - test/command/test-tokenize.rb
319
- - test/command/test-table-tokenize.rb
320
- - test/command/test-request-cancel.rb
321
- - test/command/test-column-copy.rb
322
- - test/command/test-suggest.rb
323
- - test/command/test-column-remove.rb
324
- - test/command/test-object-remove.rb
325
317
  - test/command/test-logical-shard-list.rb
326
- - test/command/test-column-create.rb
327
- - test/command/test-get.rb
328
- - test/command/test-load.rb
329
- - test/command/test-reindex.rb
330
- - test/command/test-plugin-unregister.rb
331
- - test/command/test-io-flush.rb
332
318
  - test/command/test-logical-table-remove.rb
333
- - test/command/test-index-column-diff.rb
334
- - test/command/test-register.rb
319
+ - test/command/test-normalize.rb
320
+ - test/command/test-object-exist.rb
335
321
  - test/command/test-object-inspect.rb
336
- - test/command/test-delete.rb
322
+ - test/command/test-object-remove.rb
323
+ - test/command/test-plugin-register.rb
324
+ - test/command/test-plugin-unregister.rb
337
325
  - test/command/test-query-expand.rb
338
- - test/command/test-table-list.rb
339
- - test/command/test-status.rb
340
- - test/command/test-thread-limit.rb
341
- - test/command/test-config-set.rb
342
- - test/command/test-log-level.rb
343
- - test/command/test-shutdown.rb
326
+ - test/command/test-query-log-flags-add.rb
327
+ - test/command/test-query-log-flags-get.rb
328
+ - test/command/test-query-log-flags-remove.rb
329
+ - test/command/test-query-log-flags-set.rb
330
+ - test/command/test-range-filter.rb
331
+ - test/command/test-register.rb
332
+ - test/command/test-reindex.rb
333
+ - test/command/test-request-cancel.rb
344
334
  - test/command/test-ruby-eval.rb
335
+ - test/command/test-ruby-load.rb
345
336
  - test/command/test-schema.rb
346
- - test/command/test-normalize.rb
347
- - test/command/test-dump.rb
348
- - test/command/test-base.rb
349
- - test/command/test-logical-count.rb
350
- - test/command/test-table-remove.rb
351
337
  - test/command/test-select.rb
338
+ - test/command/test-shutdown.rb
339
+ - test/command/test-status.rb
340
+ - test/command/test-suggest.rb
341
+ - test/command/test-table-copy.rb
342
+ - test/command/test-table-create.rb
343
+ - test/command/test-table-list.rb
344
+ - test/command/test-table-remove.rb
345
+ - test/command/test-table-rename.rb
346
+ - test/command/test-table-tokenize.rb
347
+ - test/command/test-thread-limit.rb
348
+ - test/command/test-tokenize.rb
349
+ - test/command/test-truncate.rb
352
350
  - test/groonga-command-test-utils.rb
351
+ - test/run-test.rb