alamb commented on code in PR #2186:
URL: https://github.com/apache/arrow-datafusion/pull/2186#discussion_r846767435


##########
ballista/rust/scheduler/src/state/persistent_state.rs:
##########
@@ -124,28 +124,33 @@ impl<T: 'static + AsLogicalPlan, U: 'static + 
AsExecutionPlan>
             .get_from_prefix(&get_stage_prefix(&self.namespace))
             .await?;
 
+        let mut tmp_stages: HashMap<StageKey, Arc<dyn ExecutionPlan>> = 
HashMap::new();

Review Comment:
   This makes sense to me (make the snapshot while not holding the lock) but I 
am not familiar enough with the ballista codebase to know if it would cause 
problems. Perhaps @mingmwang @yahoNanJing  or @thinkharderdev  could review it 
too?



##########
datafusion/physical-expr/src/expressions/lead_lag.rs:
##########
@@ -151,11 +151,11 @@ fn shift_with_default_value(
         create_empty_array(value, array.data_type(), array.len())
     } else {
         let slice_offset = (-offset).clamp(0, value_len) as usize;
-        let length = array.len() - offset.abs() as usize;
+        let length = array.len() - offset.unsigned_abs() as usize;

Review Comment:
   looking at this code I wonder if we need to check for `offset < 0` -- 
however, this PR seems like a definite improvement so 👍 



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