red-arrow 12.0.0 → 13.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/arrow/arrow.cpp +25 -0
- data/ext/arrow/extconf.rb +2 -2
- data/lib/arrow/chunked-array.rb +5 -1
- data/lib/arrow/expression.rb +6 -2
- data/lib/arrow/function.rb +0 -1
- data/lib/arrow/slicer.rb +1 -1
- data/lib/arrow/version.rb +1 -1
- data/test/test-expression.rb +11 -0
- data/test/test-table.rb +7 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcbc004b8b61405c6e1143428ca37aac1be3de4d31d73f0a235f9c2e8d7bf5bb
|
4
|
+
data.tar.gz: 508ba001225d07eae018b7552987c6102a8b59c98f4d717b4e88ad1a188d84b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cbeae509369615824b6c5d41d8f97d4b166ca99d9b1dc3fba4207e726ac22a0147027cb531761ba91245df7d71bb02ab370221ec72359470149ace65b2a01f7
|
7
|
+
data.tar.gz: 2043d58148d1370789ad6b75ed605b7d3a78c1094f2250a09b0857a43d24f37a83a5706b3b96b41dfa7f0dafa22179dde63a4e991e58e85f19002759cfed52b8
|
data/ext/arrow/arrow.cpp
CHANGED
@@ -43,6 +43,26 @@ namespace red_arrow {
|
|
43
43
|
VALUE month;
|
44
44
|
VALUE nanosecond;
|
45
45
|
}
|
46
|
+
|
47
|
+
void
|
48
|
+
record_batch_reader_mark(gpointer object)
|
49
|
+
{
|
50
|
+
auto reader = GARROW_RECORD_BATCH_READER(object);
|
51
|
+
auto sources = garrow_record_batch_reader_get_sources(reader);
|
52
|
+
for (auto source = sources; sources; sources = g_list_next(sources)) {
|
53
|
+
rbgobj_gc_mark_instance(source->data);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
void
|
58
|
+
execute_plan_mark(gpointer object)
|
59
|
+
{
|
60
|
+
auto plan = GARROW_EXECUTE_PLAN(object);
|
61
|
+
auto nodes = garrow_execute_plan_get_nodes(plan);
|
62
|
+
for (auto node = nodes; nodes; nodes = g_list_next(nodes)) {
|
63
|
+
rbgobj_gc_mark_instance(node->data);
|
64
|
+
}
|
65
|
+
}
|
46
66
|
}
|
47
67
|
|
48
68
|
extern "C" void Init_arrow() {
|
@@ -93,4 +113,9 @@ extern "C" void Init_arrow() {
|
|
93
113
|
red_arrow::symbols::millisecond = ID2SYM(rb_intern("millisecond"));
|
94
114
|
red_arrow::symbols::month = ID2SYM(rb_intern("month"));
|
95
115
|
red_arrow::symbols::nanosecond = ID2SYM(rb_intern("nanosecond"));
|
116
|
+
|
117
|
+
rbgobj_register_mark_func(GARROW_TYPE_RECORD_BATCH_READER,
|
118
|
+
red_arrow::record_batch_reader_mark);
|
119
|
+
rbgobj_register_mark_func(GARROW_TYPE_EXECUTE_PLAN,
|
120
|
+
red_arrow::execute_plan_mark);
|
96
121
|
}
|
data/ext/arrow/extconf.rb
CHANGED
@@ -41,9 +41,8 @@ end
|
|
41
41
|
unless required_pkg_config_package([
|
42
42
|
"arrow",
|
43
43
|
Arrow::Version::MAJOR,
|
44
|
-
Arrow::Version::MINOR,
|
45
|
-
Arrow::Version::MICRO,
|
46
44
|
],
|
45
|
+
conda: "libarrow",
|
47
46
|
debian: "libarrow-dev",
|
48
47
|
fedora: "libarrow-devel",
|
49
48
|
homebrew: "apache-arrow",
|
@@ -58,6 +57,7 @@ unless required_pkg_config_package([
|
|
58
57
|
Arrow::Version::MINOR,
|
59
58
|
Arrow::Version::MICRO,
|
60
59
|
],
|
60
|
+
conda: "arrow-c-glib",
|
61
61
|
debian: "libarrow-glib-dev",
|
62
62
|
fedora: "libarrow-glib-devel",
|
63
63
|
homebrew: "apache-arrow-glib",
|
data/lib/arrow/chunked-array.rb
CHANGED
data/lib/arrow/expression.rb
CHANGED
@@ -31,10 +31,14 @@ module Arrow
|
|
31
31
|
else
|
32
32
|
return nil
|
33
33
|
end
|
34
|
+
options = nil
|
34
35
|
if arguments.last.is_a?(FunctionOptions)
|
35
36
|
options = arguments.pop
|
36
|
-
|
37
|
-
|
37
|
+
elsif arguments.last.is_a?(Hash)
|
38
|
+
function = Function.find(function_name)
|
39
|
+
if function
|
40
|
+
options = function.resolve_options(arguments.pop)
|
41
|
+
end
|
38
42
|
end
|
39
43
|
CallExpression.new(function_name, arguments, options)
|
40
44
|
else
|
data/lib/arrow/function.rb
CHANGED
data/lib/arrow/slicer.rb
CHANGED
data/lib/arrow/version.rb
CHANGED
data/test/test-expression.rb
CHANGED
@@ -36,5 +36,16 @@ class TestExpression < Test::Unit::TestCase
|
|
36
36
|
assert_equal(Arrow::CallExpression.new("func", ["argument1"]),
|
37
37
|
Arrow::Expression.try_convert(["func", "argument1"]))
|
38
38
|
end
|
39
|
+
|
40
|
+
test("[Symbol, String, Hash]") do
|
41
|
+
options = Arrow::MatchSubstringOptions.new
|
42
|
+
options.pattern = "hello"
|
43
|
+
assert_equal(Arrow::CallExpression.new("match_substring",
|
44
|
+
["content"],
|
45
|
+
options),
|
46
|
+
Arrow::Expression.try_convert([:match_substring,
|
47
|
+
"content",
|
48
|
+
{pattern: "hello"}]))
|
49
|
+
end
|
39
50
|
end
|
40
51
|
end
|
data/test/test-table.rb
CHANGED
@@ -589,6 +589,13 @@ class TableTest < Test::Unit::TestCase
|
|
589
589
|
0 1
|
590
590
|
TABLE
|
591
591
|
end
|
592
|
+
|
593
|
+
test("empty result") do
|
594
|
+
selected_table = @table.filter([false] * @table.size).select_columns(:a)
|
595
|
+
assert_equal(<<-TABLE, selected_table.to_s)
|
596
|
+
a
|
597
|
+
TABLE
|
598
|
+
end
|
592
599
|
end
|
593
600
|
|
594
601
|
sub_test_case("#column_names") do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: red-arrow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 13.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Apache Arrow Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bigdecimal
|
@@ -323,7 +323,7 @@ homepage: https://arrow.apache.org/
|
|
323
323
|
licenses:
|
324
324
|
- Apache-2.0
|
325
325
|
metadata:
|
326
|
-
msys2_mingw_dependencies: arrow>=
|
326
|
+
msys2_mingw_dependencies: arrow>=13.0.0
|
327
327
|
post_install_message:
|
328
328
|
rdoc_options: []
|
329
329
|
require_paths:
|