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

[C++] Decimal128Builder is not reset in Finish()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.14.1
    • 0.15.0
    • C++

    Description

      Repro:

      decimal128-builder_test.cc
      TEST(ArrowDecimal128BuilderTest, TestResetAfterFinish) {
        auto type = std::make_shared<::arrow::Decimal128Type>(4, 4);
        auto builder = std::make_shared<::arrow::Decimal128Builder>(type);
      
        std::shared_ptr<::arrow::Array> out;
        ASSERT_OK(builder->Append("1"));
        ASSERT_OK(builder->Finish(&out));
      
        ASSERT_OK(builder->Append("2"));
        ASSERT_OK(builder->Finish(&out));
        ASSERT_EQ(out->length(), 1);
      }
      

      Output:

        Expected equality of these values:
          out->length()
          Which is: 2
          1

      Attachments

        Issue Links

          Activity

            People

              kjung520 Kenneth Jung
              kjung520 Kenneth Jung
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m