Specialized String representation
(column: &ArrayRef, row_index: usize)
| 205 | |
| 206 | /// Specialized String representation |
| 207 | fn col_str(column: &ArrayRef, row_index: usize) -> String { |
| 208 | // NullArray::is_null() does not work on NullArray. |
| 209 | // can remove check for DataType::Null when |
| 210 | // https://github.com/apache/arrow-rs/issues/4835 is fixed |
| 211 | if column.data_type() == &DataType::Null || column.is_null(row_index) { |
| 212 | return "NULL".to_string(); |
| 213 | } |
| 214 | |
| 215 | array_value_to_string(column, row_index) |
| 216 | .ok() |
| 217 | .unwrap_or_else(|| "???".to_string()) |
| 218 | } |
| 219 | |
| 220 | /// Converts the results into a 2d array of strings, `result[row][column]` |
| 221 | /// Special cases nulls to NULL for testing |
no test coverage detected
searching dependent graphs…