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

Function garrow_array_equal_options

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

* garrow_array_equal_options: * @array: A #GArrowArray. * @other_array: A #GArrowArray to be compared. * @options: (nullable): A #GArrowEqualOptions to custom how to compare. * * Returns: %TRUE if both of them have the same data, %FALSE * otherwise. * * Since: 5.0.0 */

Source from the content-addressed store, hash-verified

944 * Since: 5.0.0
945 */
946gboolean
947garrow_array_equal_options(GArrowArray *array,
948 GArrowArray *other_array,
949 GArrowEqualOptions *options)
950{
951 const auto arrow_array = garrow_array_get_raw(array);
952 const auto arrow_other_array = garrow_array_get_raw(other_array);
953 if (options) {
954 auto is_approx = garrow_equal_options_is_approx(options);
955 const auto arrow_options = garrow_equal_options_get_raw(options);
956 if (is_approx) {
957 return arrow_array->ApproxEquals(arrow_other_array, *arrow_options);
958 } else {
959 return arrow_array->Equals(arrow_other_array, *arrow_options);
960 }
961 } else {
962 return arrow_array->Equals(arrow_other_array);
963 }
964}
965
966/**
967 * garrow_array_equal_approx:

Callers 1

garrow_array_equalFunction · 0.85

Calls 4

garrow_array_get_rawFunction · 0.70
ApproxEqualsMethod · 0.45
EqualsMethod · 0.45

Tested by

no test coverage detected