You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Kenneth Jung (JIRA)" <ji...@apache.org> on 2019/07/30 19:43:00 UTC

[jira] [Created] (ARROW-6073) Decimal128Builder is not reset in Finish()

Kenneth Jung created ARROW-6073:
-----------------------------------

             Summary: Decimal128Builder is not reset in Finish()
                 Key: ARROW-6073
                 URL: https://issues.apache.org/jira/browse/ARROW-6073
             Project: Apache Arrow
          Issue Type: Bug
          Components: C++
    Affects Versions: 0.14.1
            Reporter: Kenneth Jung


Repro:
{code:java|title=decimal128-builder_test.cc|borderStyle=solid}
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);
}
{code}
Output:

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



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)