You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "mustafasrepo (via GitHub)" <gi...@apache.org> on 2023/06/12 07:03:22 UTC

[GitHub] [arrow-datafusion] mustafasrepo commented on a diff in pull request #6621: Simplify and encapsulate window function state management

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


##########
datafusion/physical-expr/src/window/nth_value.rs:
##########
@@ -169,9 +164,35 @@ impl PartitionEvaluator for NthValueEvaluator {
         Ok(())
     }
 
-    fn set_state(&mut self, state: &BuiltinWindowState) -> Result<()> {
-        if let BuiltinWindowState::NthValue(nth_value_state) = state {
-            self.state = nth_value_state.clone()
+    /// When the window frame has a fixed beginning (e.g UNBOUNDED
+    /// PRECEDING), some functions such as FIRST_VALUE, LAST_VALUE and

Review Comment:
   I think we can replace this line with `PRECEDING), for some functions such as FIRST_VALUE, LAST_VALUE and`



-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org