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:1243–1256  ·  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

1241 * Since: 0.15.0
1242 */
1243gchar *
1244garrow_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:

Callers

nothing calls this directly

Calls 8

diff_sinkMethod · 0.80
strMethod · 0.80
garrow_array_get_rawFunction · 0.70
EqualOptionsClass · 0.50
EqualsMethod · 0.45
emptyMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected