| 66 | }; |
| 67 | |
| 68 | std::shared_ptr<Array> SliceArrayFromJSON(const std::shared_ptr<DataType>& ty, |
| 69 | std::string_view json, int64_t offset = 0, |
| 70 | int64_t length = -1) { |
| 71 | auto array = *ArrayFromJSONString(ty, json); |
| 72 | if (length != -1) { |
| 73 | return array->Slice(offset, length); |
| 74 | } else { |
| 75 | return array->Slice(offset); |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | template <typename BuilderType> |
| 80 | std::shared_ptr<Array> BinaryArrayFromStrings( |