comphead commented on code in PR #26192:
URL: https://github.com/apache/datafusion/pull/26192#discussion_r4250068103


##########
datafusion/functions-nested/src/extract.rs:
##########
@@ -618,7 +619,9 @@ where
     // We have the slice syntax compatible with DuckDB v0.8.1.
     // The rule `adjusted_from_index` and `adjusted_to_index` follows the rule 
of array_slice in duckdb.
 
-    let mut offsets = vec![O::usize_as(0)];
+    let mut offsets = Vec::with_capacity(array.len() + 1);
+    offsets.push(O::usize_as(0));
+    let mut indices = Vec::new();

Review Comment:
   Thanks, added in b67eecdc4. The new `array_slice.slt` case mixes strided, 
contiguous, empty, NULL and negative-stride rows in one batch for both `List` 
and `ListView`. It fails if the `indices.clear()` calls are removed.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to