We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Same idea as #3496 - slicing a record-batch with a list array inside doesn't correctly take into account the offset.
To Reproduce This test will reproduce:
#[test] fn encode_lists() { let val_inner = Field::new("item", DataType::UInt32, true); let val_list_field = Field::new("val", DataType::List(Box::new(val_inner)), false); let schema = Arc::new(Schema::new(vec![val_list_field])); let values = { let u32 = UInt32Builder::new(); let mut ls = ListBuilder::new(u32); for list in vec![vec![1u32, 2, 3], vec![4, 5, 6], vec![7, 8, 9, 10]] { for value in list { ls.values().append_value(value); } ls.append(true) } ls.finish() }; let batch = RecordBatch::try_new(Arc::clone(&schema), vec![Arc::new(values)]).unwrap(); let batch = batch.slice(1, 1); let mut writer = FileWriter::try_new(Vec::<u8>::new(), &schema).unwrap(); writer.write(&batch).unwrap(); writer.finish().unwrap(); let data = writer.into_inner().unwrap(); let mut reader = FileReader::try_new(Cursor::new(data), None).unwrap(); let batch2 = reader.next().unwrap().unwrap(); assert_eq!(batch, batch2); }
Expected behavior The sliced record batch should match its roundtrip.
The text was updated successfully, but these errors were encountered:
This sounds like #2080
Sorry, something went wrong.
Add Sliced ListArray test (apache#3748)
2429279
Add Sliced ListArray test (#3748) (#4186)
51a9d0f
label_issue.py automatically added labels {'arrow'} from #4186
label_issue.py
tustvold
Successfully merging a pull request may close this issue.
Describe the bug
Same idea as #3496 - slicing a record-batch with a list array inside doesn't correctly take into account the offset.
To Reproduce
This test will reproduce:
Expected behavior
The sliced record batch should match its roundtrip.
The text was updated successfully, but these errors were encountered: