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 +4 -4
- data/doc/text/news.md +7 -0
- data/lib/groonga/command/load.rb +11 -6
- data/lib/groonga/command/version.rb +1 -1
- metadata +46 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db7a5707522535c4fa87ad7160ef88d7e565955966ffcd2a2095ee002ae5ebf8
|
4
|
+
data.tar.gz: 422962c60a3e33d66c6348c6e39054d9389a3b645886bc627cb6d88bd377e8d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2ddb7d2c79f215b1f41d9806782352aca990c954844b54af486b37c71cbeb0f8a80e34046dc919133b66f9f0e28726f61af325145e233edd74cfabc967c57aa
|
7
|
+
data.tar.gz: d13d857186cccf9ca8cda06d400a1955d7c3d416f149610c22a7f0d784e7a9e5c9e56150074e38fabf9ecef5977394a6b9a4700e16041b44cf6e67045cf3f859
|
data/doc/text/news.md
CHANGED
data/lib/groonga/command/load.rb
CHANGED
@@ -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
|
-
|
185
|
-
|
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" =>
|
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
|
-
|
253
|
-
|
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
|
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.
|
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-
|
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
|
-
|
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/
|
298
|
-
- test/command/test-
|
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-
|
303
|
+
- test/command/test-config-delete.rb
|
301
304
|
- test/command/test-config-get.rb
|
302
|
-
- test/command/test-
|
303
|
-
- test/command/test-
|
304
|
-
- test/command/test-
|
305
|
-
- test/command/
|
306
|
-
- test/command/test-
|
307
|
-
- test/command/test-
|
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-
|
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-
|
334
|
-
- test/command/test-
|
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-
|
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-
|
339
|
-
- test/command/test-
|
340
|
-
- test/command/test-
|
341
|
-
- test/command/test-
|
342
|
-
- test/command/test-
|
343
|
-
- test/command/test-
|
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
|