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

Function GetArray

cpp/src/arrow/engine/substrait/function_test.cc:63–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61};
62
63Result<std::shared_ptr<Array>> GetArray(const std::string& value,
64 const std::shared_ptr<DataType>& data_type) {
65 StringBuilder str_builder;
66 if (value.empty()) {
67 ARROW_EXPECT_OK(str_builder.AppendNull());
68 } else {
69 ARROW_EXPECT_OK(str_builder.Append(value));
70 }
71 ARROW_ASSIGN_OR_RAISE(std::shared_ptr<Array> value_str, str_builder.Finish());
72 ARROW_ASSIGN_OR_RAISE(Datum value_datum, compute::Cast(value_str, data_type));
73 return value_datum.make_array();
74}
75
76Result<std::shared_ptr<Table>> GetInputTable(
77 const std::vector<std::string>& arguments,

Callers 6

GetInputTableFunction · 0.85
GetOutputTableFunction · 0.85
GetRecordBatchMethod · 0.85
GetChunkedArrayMethod · 0.85
TestArraySortMethod · 0.85
TEST_FFunction · 0.85

Calls 6

make_arrayMethod · 0.80
ARROW_ASSIGN_OR_RAISEFunction · 0.70
emptyMethod · 0.45
AppendNullMethod · 0.45
AppendMethod · 0.45
FinishMethod · 0.45

Tested by

no test coverage detected