avantgardnerio commented on code in PR #4989:
URL: https://github.com/apache/arrow-datafusion/pull/4989#discussion_r1081807258
##########
datafusion/common/src/utils.rs:
##########
@@ -22,8 +22,16 @@ use arrow::array::ArrayRef;
use arrow::compute::SortOptions;
use std::cmp::Ordering;
+/// Given column vectors, returns row at `idx`.
+pub fn get_row_at_idx(columns: &[ArrayRef], idx: usize) ->
Result<Vec<ScalarValue>> {
+ columns
+ .iter()
+ .map(|arr| ScalarValue::try_from_array(arr, idx))
Review Comment:
What dark magic converts this from an `Vec<Result<ScalarValue>>` to a
`Result<Vec<ScalarValue>>`?
##########
datafusion/physical-expr/src/window/window_frame_state.rs:
##########
@@ -85,6 +88,7 @@ impl<'a> WindowFrameContext<'a> {
sort_options,
length,
idx,
+ last_range,
Review Comment:
The last_range being added everywhere is a performance optimization to not
throw away the index which was previously calculated?
--
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]