mustafasrepo commented on code in PR #9470:
URL: https://github.com/apache/arrow-datafusion/pull/9470#discussion_r1515763286


##########
datafusion/physical-expr/src/window/nth_value.rs:
##########
@@ -210,9 +225,31 @@ impl PartitionEvaluator for NthValueEvaluator {
                 // We produce None if the window is empty.
                 return ScalarValue::try_from(arr.data_type());
             }
+
+            let mut valid_indices = Vec::new();
+            if self.ignore_nulls {
+                valid_indices = 
arr.nulls().unwrap().valid_indices().collect::<Vec<_>>();

Review Comment:
   I think, the unexpected result I mentioned is related to here. You might 
need calculate valid_indices within the `range` not on whole `arr`.



-- 
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]

Reply via email to