nanoarrow 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/ext/nanoarrow/array_stream.c +11 -10
- data/ext/nanoarrow/utils.c +1 -1
- data/lib/nanoarrow/iterator.rb +1 -1
- data/lib/nanoarrow/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 03311f979ec7b06c710266061eadecd313088d511107d3e557192e823dffd90d
|
|
4
|
+
data.tar.gz: 6c39c7cdb72aa529c4b51a9104811c8796aecb503d1dc2cc79c8f7d143f5e9db
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ebf988503dbe70a6a11c6716b397c2dc22ff80c5d7d97f6185dbf124f2a22cc6da6d2d1e3044a62c31bd5ce47e07ba264ec196f90fd2ea6c79dc8aae285483b3
|
|
7
|
+
data.tar.gz: 0272d0d567a704dd99c87b7c5f6bac3696240a6a6b114e9e5697d8a55cc441fe68479a557f586c07e539e8bef215e8efee7df08bebfac93262a577f72d0ab4d3
|
data/CHANGELOG.md
CHANGED
|
@@ -51,14 +51,13 @@ static VALUE array_stream_import_from_c_capsule(VALUE klass, VALUE schema_capsul
|
|
|
51
51
|
|
|
52
52
|
static VALUE array_stream_from_c_arrays(VALUE klass, VALUE arrays, VALUE schema, VALUE validate)
|
|
53
53
|
{
|
|
54
|
-
|
|
55
|
-
VALUE
|
|
56
|
-
GetArrayStream(out, stream);
|
|
54
|
+
struct ArrowArrayStream* c_array_stream_out;
|
|
55
|
+
VALUE base = alloc_c_array_stream(&c_array_stream_out);
|
|
57
56
|
|
|
58
57
|
// TODO move to parameter
|
|
59
58
|
VALUE move = Qfalse;
|
|
60
59
|
|
|
61
|
-
VALUE out_schema;
|
|
60
|
+
VALUE out_schema = schema;
|
|
62
61
|
VALUE validate_schema;
|
|
63
62
|
if (RTEST(validate) && !RTEST(move))
|
|
64
63
|
{
|
|
@@ -73,18 +72,15 @@ static VALUE array_stream_from_c_arrays(VALUE klass, VALUE arrays, VALUE schema,
|
|
|
73
72
|
else
|
|
74
73
|
out_schema = rb_funcall(schema, rb_intern("deep_dup"), 0);
|
|
75
74
|
|
|
76
|
-
schema_t*
|
|
77
|
-
GetSchema(out_schema,
|
|
75
|
+
schema_t* out_schema_ptr;
|
|
76
|
+
GetSchema(out_schema, out_schema_ptr);
|
|
78
77
|
|
|
79
78
|
Check_Type(arrays, T_ARRAY);
|
|
80
79
|
long arrays_len = RARRAY_LEN(arrays);
|
|
81
80
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
int code = ArrowBasicArrayStreamInit(stream->ptr, schema_ptr->ptr, arrays_len);
|
|
81
|
+
int code = ArrowBasicArrayStreamInit(c_array_stream_out, out_schema_ptr->ptr, arrays_len);
|
|
85
82
|
raise_error_not_ok("ArrowBasicArrayStreamInit()", code);
|
|
86
83
|
|
|
87
|
-
struct ArrowArrayStream* c_array_stream_out = stream->ptr;
|
|
88
84
|
struct ArrowArray tmp;
|
|
89
85
|
for (long i = 0; i < arrays_len; i++)
|
|
90
86
|
{
|
|
@@ -110,6 +106,11 @@ static VALUE array_stream_from_c_arrays(VALUE klass, VALUE arrays, VALUE schema,
|
|
|
110
106
|
raise_message_not_ok(&error, "ArrowBasicArrayStreamValidate()", code);
|
|
111
107
|
}
|
|
112
108
|
|
|
109
|
+
array_stream_t* stream;
|
|
110
|
+
VALUE out = array_stream_allocate(klass);
|
|
111
|
+
GetArrayStream(out, stream);
|
|
112
|
+
stream->base = base;
|
|
113
|
+
stream->ptr = c_array_stream_out;
|
|
113
114
|
return out;
|
|
114
115
|
}
|
|
115
116
|
|
data/ext/nanoarrow/utils.c
CHANGED
data/lib/nanoarrow/iterator.rb
CHANGED
data/lib/nanoarrow/version.rb
CHANGED