* garrow_array_diff_unified: * @array: A #GArrowArray. * @other_array: A #GArrowArray to be compared. * * Returns: (nullable) (transfer full): The string representation of * the difference between two arrays as unified format. If there is * no difference, the return value is %NULL. * * It should be freed with g_free() when no longer needed. * * Since: 0.15.0 */
| 1241 | * Since: 0.15.0 |
| 1242 | */ |
| 1243 | gchar * |
| 1244 | garrow_array_diff_unified(GArrowArray *array, GArrowArray *other_array) |
| 1245 | { |
| 1246 | const auto arrow_array = garrow_array_get_raw(array); |
| 1247 | const auto arrow_other_array = garrow_array_get_raw(other_array); |
| 1248 | std::stringstream diff; |
| 1249 | arrow_array->Equals(arrow_other_array, arrow::EqualOptions().diff_sink(&diff)); |
| 1250 | auto string = diff.str(); |
| 1251 | if (string.empty()) { |
| 1252 | return NULL; |
| 1253 | } else { |
| 1254 | return g_strndup(string.data(), string.size()); |
| 1255 | } |
| 1256 | } |
| 1257 | |
| 1258 | /** |
| 1259 | * garrow_array_concatenate: |
nothing calls this directly
no test coverage detected