laskoviymishka commented on code in PR #3178:
URL: https://github.com/apache/iceberg-rust/pull/3178#discussion_r3972024443
##########
crates/iceberg/src/arrow/value.rs:
##########
@@ -822,7 +822,12 @@ pub(crate) fn create_primitive_array_repeated(
Ok(match (data_type, prim_lit) {
// --- Primitive Some arms ---
(DataType::Boolean, Some(PrimitiveLiteral::Boolean(value))) => {
- Arc::new(BooleanArray::from(vec![*value; num_rows]))
+ let buffer = if *value {
Review Comment:
The existing repeated-array tests only cover the Decimal128 and Timestamp
arms, so this boolean path isn't actually exercised — the "covered by existing
tests" note doesn't quite hold here.
Since we're touching it anyway, a tiny test over true / false / num_rows ==
0 asserting `len() == num_rows` and `null_count() == 0` would lock the
equivalence in for cheap. Not blocking given the logic reads correct — wdyt?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]