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