MCPcopy Create free account
hub / github.com/apache/arrow / garrow_array_diff_unified

Function garrow_array_diff_unified

c_glib/arrow-glib/basic-array.cpp:1244–1257  ·  view source on GitHub ↗

* 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 */

Source from the content-addressed store, hash-verified

1242 * Since: 0.15.0
1243 */
1244gchar *
1245garrow_array_diff_unified(GArrowArray *array, GArrowArray *other_array)
1246{
1247 const auto arrow_array = garrow_array_get_raw(array);
1248 const auto arrow_other_array = garrow_array_get_raw(other_array);
1249 std::stringstream diff;
1250 arrow_array->Equals(arrow_other_array, arrow::EqualOptions().diff_sink(&diff));
1251 auto string = diff.str();
1252 if (string.empty()) {
1253 return NULL;
1254 } else {
1255 return g_strndup(string.data(), string.size());
1256 }
1257}
1258
1259/**
1260 * garrow_array_concatenate:

Callers

nothing calls this directly

Calls 7

EqualOptionsClass · 0.85
strMethod · 0.80
garrow_array_get_rawFunction · 0.70
EqualsMethod · 0.45
emptyMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected