You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by bk...@apache.org on 2022/11/20 02:29:13 UTC

[arrow] branch feature/format-string-view updated: wrote <=, needed >=

This is an automated email from the ASF dual-hosted git repository.

bkietz pushed a commit to branch feature/format-string-view
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/feature/format-string-view by this push:
     new 8f9792d68a wrote <=, needed >=
8f9792d68a is described below

commit 8f9792d68a73dba1a553c96ad08e4a4f7ab40a2a
Author: Benjamin Kietzman <be...@gmail.com>
AuthorDate: Sat Nov 19 21:28:48 2022 -0500

    wrote <=, needed >=
---
 cpp/src/arrow/array/concatenate_test.cc | 2 +-
 cpp/src/arrow/array/validate.cc         | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cpp/src/arrow/array/concatenate_test.cc b/cpp/src/arrow/array/concatenate_test.cc
index 1bc0c65bec..59d7885784 100644
--- a/cpp/src/arrow/array/concatenate_test.cc
+++ b/cpp/src/arrow/array/concatenate_test.cc
@@ -91,7 +91,7 @@ class ConcatenateTest : public ::testing::Test {
       for (auto null_probability : this->null_probabilities_) {
         std::shared_ptr<Array> array;
         factory(size, null_probability, &array);
-          ASSERT_OK(array->ValidateFull());
+        ASSERT_OK(array->ValidateFull());
         auto expected = array->Slice(offsets.front(), offsets.back() - offsets.front());
         auto slices = this->Slices(array, offsets);
         ASSERT_OK_AND_ASSIGN(auto actual, Concatenate(slices));
diff --git a/cpp/src/arrow/array/validate.cc b/cpp/src/arrow/array/validate.cc
index 53d74ba148..53836efd97 100644
--- a/cpp/src/arrow/array/validate.cc
+++ b/cpp/src/arrow/array/validate.cc
@@ -615,7 +615,7 @@ struct ValidateArrayImpl {
 
     auto IsSubrangeOf = [](std::string_view super, std::string_view sub) {
       return super.data() <= sub.data() &&
-             super.data() + super.size() <= sub.data() + sub.size();
+             super.data() + super.size() >= sub.data() + sub.size();
     };
 
     std::vector<std::string_view> buffers;
@@ -643,7 +643,7 @@ struct ValidateArrayImpl {
 
         if (!in_a_buffer(view)) {
           return Status::Invalid(
-              "String view at slot ", i,
+              "String view at slot ", i, " @", (std::uintptr_t)view.data(),
               " views memory not resident in any buffer managed by the array");
         }
       }