Validates the combination of `views` and `buffers` is a valid StringView
(views: &[u128], buffers: &[Buffer])
| 151 | |
| 152 | /// Validates the combination of `views` and `buffers` is a valid StringView |
| 153 | pub fn validate_string_view(views: &[u128], buffers: &[Buffer]) -> Result<(), ArrowError> { |
| 154 | validate_view_impl(views, buffers, |idx, b| { |
| 155 | std::str::from_utf8(b).map_err(|e| { |
| 156 | ArrowError::InvalidArgumentError(format!( |
| 157 | "Encountered non-UTF-8 data at index {idx}: {e}" |
| 158 | )) |
| 159 | })?; |
| 160 | Ok(()) |
| 161 | }) |
| 162 | } |
| 163 | |
| 164 | fn validate_view_impl<F>(views: &[u128], buffers: &[Buffer], f: F) -> Result<(), ArrowError> |
| 165 | where |
no test coverage detected