Skip to content

InvalidArgumentError("Expected 1 buffers in array of type FixedSizeBinary(4), got 2" #9247

@alamb

Description

@alamb

Describe the bug
There is some issue with decoding fixedsizebinary I found while working on tests for other

To Reproduce

Add this test to the parquet tests:

--- a/parquet/src/arrow/arrow_writer/mod.rs
+++ b/parquet/src/arrow/arrow_writer/mod.rs
@@ -2161,8 +2161,11 @@ mod tests {
             )
             .unwrap();

-            let data = DictionaryArray::<K>::new(keys, Arc::new(values));
-            let batch = RecordBatch::try_new(Arc::new(schema), vec![Arc::new(data)]).unwrap();
+
+            let data: ArrayRef = Arc::new(DictionaryArray::<K>::new(keys, Arc::new(values)));
+            one_column_roundtrip(Arc::clone(&data), true);
+
+            let batch = RecordBatch::try_new(Arc::new(schema), vec![data]).unwrap();
             roundtrip(batch, None);
         }

Fails like this

---- arrow::arrow_writer::tests::test_fixed_size_binary_in_dict stdout ----

thread 'arrow::arrow_writer::tests::test_fixed_size_binary_in_dict' (467576) panicked at parquet/src/arrow/buffer/offset_buffer.rs:133:48:
called `Result::unwrap()` on an `Err` value: InvalidArgumentError("Expected 1 buffers in array of type FixedSizeBinary(4), got 2")

I am pretty sure this is related to disabling dictionary pages

Expected behavior
Test should pass

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions