Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RunEndEncodedBuilder->Finish() doesn't properly reset builder state when called #45532

Open
lesterfan opened this issue Feb 13, 2025 · 1 comment

Comments

@lesterfan
Copy link

lesterfan commented Feb 13, 2025

Describe the bug, including details regarding any error messages, version, and platform.

On the current main branch, RunEndEncodedBuilder->Finish() doesn't properly reset the builder state when called as specified by the docstring. Additionally, the function isn't idempotent and crashes the program when called twice.

ASSERT_OK_AND_ASSIGN(std::shared_ptr<ArrayBuilder> builder, MakeBuilder(ree_type));
ASSERT_OK(builder->AppendNull());
ASSERT_EQ(builder->length(), 1);
ASSERT_OK(builder->Finish());
ASSERT_EQ(builder->length(), 0); // Fails: the length is still 1
ASSERT_OK(builder->Finish());
'_error_or_value190.status()' failed with Invalid: Run-end encoded array has non-zero length 1, but run ends array has zero length

Component(s)

C++

@lesterfan
Copy link
Author

I just opened #45533 to resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant