nanoarrow 0.1.1 → 0.1.3
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 +8 -0
- data/ext/nanoarrow/array.c +2 -2
- data/ext/nanoarrow/array_builder.c +1 -1
- data/ext/nanoarrow/array_stream.c +13 -12
- data/ext/nanoarrow/array_view.c +2 -2
- data/ext/nanoarrow/buffer.c +1 -1
- data/ext/nanoarrow/mat_array_stream.c +2 -2
- data/ext/nanoarrow/schema.c +1 -1
- data/ext/nanoarrow/schema_builder.c +1 -1
- data/ext/nanoarrow/schema_view.c +1 -1
- 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: a7006022b54eed1e4dbe453d1cb591afe02983bd1d48af8a1adde8100156e932
|
|
4
|
+
data.tar.gz: 1358afb3611b1b4a046e1f275c506b32c824b87e9af05f01541bad58c8e7f9e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf2d3c844f5fcdf77e9ec9e3bd402ae466e990a9ae4c9cc536cc7e1a3844118b3a8d30128fc0384090d8c6acd9a1b8e9740d90614005c652b00cc473f8735d30
|
|
7
|
+
data.tar.gz: 5be7d313f2ee69ee4fe2623b144c3eec53e4ef131be7de0075771891248a67ffdd6201272f54bbef7582381c20f758b88103ce98742f722a91b5e27dab4eac2c
|
data/CHANGELOG.md
CHANGED
data/ext/nanoarrow/array.c
CHANGED
|
@@ -8,8 +8,8 @@ VALUE cCArray;
|
|
|
8
8
|
static void array_mark(void* ptr)
|
|
9
9
|
{
|
|
10
10
|
array_t* array = (array_t*) ptr;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
rb_gc_mark(array->base);
|
|
12
|
+
rb_gc_mark(array->schema);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
const rb_data_type_t array_data_type = {
|
|
@@ -13,7 +13,7 @@ typedef struct array_builder {
|
|
|
13
13
|
static void array_builder_mark(void* ptr)
|
|
14
14
|
{
|
|
15
15
|
array_builder_t* builder = (array_builder_t*) ptr;
|
|
16
|
-
|
|
16
|
+
rb_gc_mark(builder->c_array);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
const rb_data_type_t array_builder_data_type = {
|
|
@@ -14,8 +14,8 @@ typedef struct array_stream {
|
|
|
14
14
|
static void array_stream_mark(void* ptr)
|
|
15
15
|
{
|
|
16
16
|
array_stream_t* stream = (array_stream_t*) ptr;
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
rb_gc_mark(stream->base);
|
|
18
|
+
rb_gc_mark(stream->cached_schema);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
const rb_data_type_t array_stream_data_type = {
|
|
@@ -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/array_view.c
CHANGED
|
@@ -14,8 +14,8 @@ typedef struct array_view {
|
|
|
14
14
|
static void array_view_mark(void* ptr)
|
|
15
15
|
{
|
|
16
16
|
array_view_t* view = (array_view_t*) ptr;
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
rb_gc_mark(view->base);
|
|
18
|
+
rb_gc_mark(view->array_base);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
const rb_data_type_t array_view_data_type = {
|
data/ext/nanoarrow/buffer.c
CHANGED
|
@@ -14,8 +14,8 @@ typedef struct mat_array_stream {
|
|
|
14
14
|
static void mat_array_stream_mark(void* ptr)
|
|
15
15
|
{
|
|
16
16
|
mat_array_stream_t* stream = (mat_array_stream_t*) ptr;
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
rb_gc_mark(stream->schema);
|
|
18
|
+
rb_gc_mark(stream->arrays);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
const rb_data_type_t mat_array_stream_data_type = {
|
data/ext/nanoarrow/schema.c
CHANGED
|
@@ -13,7 +13,7 @@ typedef struct schema_builder {
|
|
|
13
13
|
static void schema_builder_mark(void* ptr)
|
|
14
14
|
{
|
|
15
15
|
schema_builder_t* builder = (schema_builder_t*) ptr;
|
|
16
|
-
|
|
16
|
+
rb_gc_mark(builder->c_schema);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
const rb_data_type_t schema_builder_data_type = {
|
data/ext/nanoarrow/schema_view.c
CHANGED
data/ext/nanoarrow/utils.c
CHANGED
data/lib/nanoarrow/iterator.rb
CHANGED
data/lib/nanoarrow/version.rb
CHANGED