jayzhan211 commented on code in PR #8569:
URL: https://github.com/apache/arrow-datafusion/pull/8569#discussion_r1431306180


##########
datafusion/physical-expr/src/array_expressions.rs:
##########
@@ -673,18 +673,72 @@ where
     )?))
 }
 
+/// If from_front is true, it is array_pop_front, otherwise array_pop_back
+fn general_pop_list<O: OffsetSizeTrait>(
+    array: &GenericListArray<O>,
+    from_front: bool,
+) -> Result<ArrayRef>
+where
+    i64: TryInto<O>,
+{
+    let (from_array, to_array) = if from_front {

Review Comment:
   Is it better we just split this to two function? Since they are so 
different, without checking true for pop front or pop back may also improve 
readability?



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