Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-5299

[C++] ListArray comparison is incorrect

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.14.0
    • C++
    • None

    Description

      Equality comparison for ListArray accounts for offsets incorrectly, so slices of ListArrays with identical offsets but differing values will sometimes compare equal.

      For example, the following test fails:

      TEST_F(TestListArray, ValuesEquality) {
        auto type = list(int32());
        auto left = ArrayFromJSON(type, "[[1, 2], [3, null], [5], []]");
        auto right = ArrayFromJSON(type, "[[1, 2], [3, null], [9], []]");
      
        AssertArraysEqual(*left->Slice(2), *right->Slice(2));
      }
      

      Attachments

        Issue Links

          Activity

            People

              bkietz Ben Kietzman
              bkietz Ben Kietzman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: