WillAyd commented on code in PR #45272: URL: https://github.com/apache/arrow/pull/45272#discussion_r2190747063
########## cpp/src/arrow/array/data.cc: ########## @@ -495,13 +495,15 @@ void ArraySpan::FillFromScalar(const Scalar& value) { if (type_id == Type::LIST) { const auto& list_scalar = checked_cast<const ListScalar&>(value); this->buffers[1] = OffsetsForScalar(list_scalar.scratch_space_, sizeof(int32_t)); + this->length = list_scalar.value->length(); Review Comment: I think this is causing issues elsewhere for now, but before diving into them further I want to check if we have an invariant that the length of any scalar is always equal to 1. The current RangeDataEqualsImpl checks the length of its arguments; in the case of Array versus Array iteration, the ArraySpans that are generated properly report the length of each child element. However, when comparing a Scalar to an Array, the ArraySpan generated by the scalar reports its length as 1 (hard coded further up in this function) so that same type of comparison does not work. Not sure if I should just change the RangeDataEqualsImpl to avoid the length check in that case, or if we consider it a but that the length of ListScalar elements is always 1 -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org