We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98a92c2 commit 0bec672Copy full SHA for 0bec672
1 file changed
r/src/array_to_vector.cpp
@@ -23,6 +23,7 @@
23
#include <arrow/table.h>
24
#include <arrow/util/bitmap_reader.h>
25
#include <arrow/util/bitmap_writer.h>
26
+#include <arrow/util/float16.h>
27
#include <arrow/util/int_util.h>
28
29
#include <type_traits>
@@ -224,7 +225,11 @@ class Converter_Double : public Converter {
224
225
}
226
auto p_data = REAL(data) + start;
227
auto ingest_one = [&](R_xlen_t i) {
- p_data[i] = static_cast<value_type>(p_values[i]);
228
+ if constexpr (std::is_same_v<Type, HalfFloatType>) {
229
+ p_data[i] = arrow::util::Float16::FromBits(p_values[i]).ToDouble();
230
+ } else {
231
+ p_data[i] = static_cast<value_type>(p_values[i]);
232
+ }
233
return Status::OK();
234
};
235
auto null_one = [&](R_xlen_t i) {
0 commit comments