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

Function GetArrayDataSample

cpp/examples/arrow/udf_example.cc:38–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 arrow::is_boolean_type<TYPE>::value |
37 arrow::is_temporal_type<TYPE>::value>::type>
38arrow::Result<std::shared_ptr<arrow::Array>> GetArrayDataSample(
39 const std::vector<typename TYPE::c_type>& values) {
40 using ArrowBuilderType = typename arrow::TypeTraits<TYPE>::BuilderType;
41 ArrowBuilderType builder;
42 ARROW_RETURN_NOT_OK(builder.Reserve(values.size()));
43 ARROW_RETURN_NOT_OK(builder.AppendValues(values));
44 return builder.Finish();
45}
46
47const cp::FunctionDoc func_doc{
48 "User-defined-function usage to demonstrate registering an out-of-tree function",

Callers

nothing calls this directly

Calls 4

ReserveMethod · 0.45
sizeMethod · 0.45
AppendValuesMethod · 0.45
FinishMethod · 0.45

Tested by

no test coverage detected