// Returns an error status if no column matching `ref` is found, or if the FieldRef is // a nested reference.
| 556 | // // Returns an error status if no column matching `ref` is found, or if the FieldRef is |
| 557 | // // a nested reference. |
| 558 | inline Result<std::shared_ptr<ChunkedArray>> GetColumn(const Table& table, |
| 559 | const FieldRef& ref) { |
| 560 | RETURN_NOT_OK(CheckNonNested(ref)); |
| 561 | ARROW_ASSIGN_OR_RAISE(auto path, ref.FindOne(*table.schema())); |
| 562 | return table.column(path[0]); |
| 563 | } |
| 564 | |
| 565 | inline Result<std::shared_ptr<Array>> GetColumn(const RecordBatch& batch, |
| 566 | const FieldRef& ref) { |
no test coverage detected