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:947–965  ·  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

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