MCPcopy Create free account
hub / github.com/apache/arrow / convert

Method convert

ruby/red-arrow/ext/arrow/values.cpp:102–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100 private:
101 template <typename ArrayType>
102 void convert(const ArrayType& array) {
103 const auto n = array.length();
104 if (array.null_count() > 0) {
105 for (int64_t i = 0, ii = row_offset_; i < n; ++i, ++ii) {
106 auto value = Qnil;
107 if (!array.IsNull(i)) {
108 value = convert_value(array, i);
109 }
110 rb_ary_store(values_, ii, value);
111 }
112 } else {
113 for (int64_t i = 0, ii = row_offset_; i < n; ++i, ++ii) {
114 rb_ary_store(values_, ii, convert_value(array, i));
115 }
116 }
117 }
118
119 // Destination for converted values.
120 VALUE values_;

Callers

nothing calls this directly

Calls 3

lengthMethod · 0.45
null_countMethod · 0.45
IsNullMethod · 0.45

Tested by

no test coverage detected