| 1786 | struct FieldPathGetImpl { |
| 1787 | template <typename Selector> |
| 1788 | static Status IndexError(const FieldPath* path, int out_of_range_depth, |
| 1789 | const Selector& selector) { |
| 1790 | std::stringstream ss; |
| 1791 | ss << "index out of range. "; |
| 1792 | |
| 1793 | ss << "indices=[ "; |
| 1794 | int depth = 0; |
| 1795 | for (int i : path->indices()) { |
| 1796 | if (depth++ != out_of_range_depth) { |
| 1797 | ss << i << " "; |
| 1798 | } else { |
| 1799 | ss << ">" << i << "< "; |
| 1800 | } |
| 1801 | } |
| 1802 | ss << "] "; |
| 1803 | |
| 1804 | selector.Summarize(&ss); |
| 1805 | |
| 1806 | return Status::IndexError(ss.str()); |
| 1807 | } |
| 1808 | |
| 1809 | template <typename Selector, typename T = typename Selector::ArrowType> |
| 1810 | static Result<std::shared_ptr<T>> Get(const FieldPath* path, Selector selector, |
nothing calls this directly
no test coverage detected