| 94 | } |
| 95 | |
| 96 | Result<std::shared_ptr<Table>> GetOutputTable( |
| 97 | const std::string& output_value, const std::shared_ptr<DataType>& output_type) { |
| 98 | std::vector<std::shared_ptr<Array>> columns(1); |
| 99 | std::vector<std::shared_ptr<Field>> fields(1); |
| 100 | ARROW_ASSIGN_OR_RAISE(columns[0], GetArray(output_value, output_type)); |
| 101 | fields[0] = field("output", output_type); |
| 102 | std::shared_ptr<RecordBatch> batch = |
| 103 | RecordBatch::Make(schema(std::move(fields)), 1, columns); |
| 104 | ARROW_ASSIGN_OR_RAISE(std::shared_ptr<Table> table, Table::FromRecordBatches({batch})); |
| 105 | return table; |
| 106 | } |
| 107 | |
| 108 | Result<std::shared_ptr<acero::ExecPlan>> PlanFromTestCase( |
| 109 | const FunctionTestCase& test_case, std::shared_ptr<Table>* output_table) { |
no test coverage detected