gyanranjanpanda commented on code in PR #9373:
URL: https://github.com/apache/arrow-rs/pull/9373#discussion_r2788596964
##########
arrow-select/src/concat.rs:
##########
@@ -1900,4 +1900,90 @@ mod tests {
assert_eq!(values.values(), &[10, 20, 30]);
assert_eq!(&[2, 3, 5], run_ends);
}
+
+ #[test]
+ fn test_concat_u8_dictionary_256_values() {
+ // Integration test: concat should work with exactly 256 unique values
+ let values = StringArray::from((0..256).map(|i| format!("v{}",
i)).collect::<Vec<_>>());
+ let keys = UInt8Array::from((0..256).map(|i| i as
u8).collect::<Vec<_>>());
+ let dict = DictionaryArray::<UInt8Type>::try_new(keys,
Arc::new(values)).unwrap();
+
+ // Concatenate with itself - should succeed
+ let result = concat(&[&dict as &dyn Array, &dict as &dyn Array]);
+ assert!(
+ result.is_ok(),
+ "Concat should succeed with 256 unique values for u8"
+ );
+
+ let concatenated = result.unwrap();
+ assert_eq!(
+ concatenated.len(),
+ 512,
+ "Should have 512 total elements (256 * 2)"
+ );
+ }
Review Comment:
@albertlockett
could u review this now
--
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]