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

Function from_datum

r/src/compute.cpp:105–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103} // namespace cpp11
104
105SEXP from_datum(arrow::Datum datum) {
106 switch (datum.kind()) {
107 case arrow::Datum::SCALAR:
108 return cpp11::to_r6(datum.scalar());
109
110 case arrow::Datum::ARRAY:
111 return cpp11::to_r6(datum.make_array());
112
113 case arrow::Datum::CHUNKED_ARRAY:
114 return cpp11::to_r6(datum.chunked_array());
115
116 case arrow::Datum::RECORD_BATCH:
117 return cpp11::to_r6(datum.record_batch());
118
119 case arrow::Datum::TABLE:
120 return cpp11::to_r6(datum.table());
121
122 default:
123 break;
124 }
125
126 cpp11::stop("from_datum: Not implemented for Datum %s", datum.ToString().c_str());
127}
128
129std::shared_ptr<arrow::compute::FunctionOptions> make_compute_options(
130 std::string func_name, cpp11::list options) {

Callers 1

compute__CallFunctionFunction · 0.85

Calls 7

to_r6Function · 0.85
stopFunction · 0.85
make_arrayMethod · 0.80
chunked_arrayMethod · 0.80
kindMethod · 0.45
scalarMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected