scovich commented on issue #8136:
URL: https://github.com/apache/arrow-rs/issues/8136#issuecomment-3186568702
Wow, an AI assistant actually found the bug by code inspection:
> me> This test is broken, can you find the bug in the variant builder code
that causes it?
>
> llm> I’m going to update the rollback logic to correctly track and restore
the number of field names, fixing the bug where dropping an unfinished builder
truncates the dictionary using the metadata buffer length instead of the
field-name count:
> ```patch
> diff --git a/parquet-variant/src/builder.rs
b/parquet-variant/src/builder.rs
> index 2d82dc38a..352758560 100644
> --- a/parquet-variant/src/builder.rs
> +++ b/parquet-variant/src/builder.rs
> @@ -689,5 +689,5 @@ impl ParentState<'_> {
> | ParentState::List {
> metadata_builder, ..
> - } => metadata_builder.metadata_buffer.len(),
> + } => metadata_builder.field_names.len(),
> }
> ```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]