liurenjie1024 commented on code in PR #231:
URL: https://github.com/apache/iceberg-rust/pull/231#discussion_r1518562233


##########
crates/iceberg/src/expr/predicate.rs:
##########
@@ -55,6 +60,29 @@ impl<T, const N: usize> LogicalExpression<T, N> {
     }
 }
 
+impl<T: Bind, const N: usize> Bind for LogicalExpression<T, N> {
+    type Bound = LogicalExpression<T::Bound, N>;
+
+    fn bind(self, schema: SchemaRef, case_sensitive: bool) -> 
Result<Self::Bound> {
+        let mut bound_inputs = MaybeUninit::<[Box<T::Bound>; N]>::uninit();
+        for (i, input) in self.inputs.into_iter().enumerate() {
+            let input = input.bind(schema.clone(), case_sensitive)?;
+            // SAFETY: The pointer is valid from [`MaybeUninit`].
+            unsafe {

Review Comment:
   Thanks for review. I'm trying hard to avoid allocation as much as possible, 
and I found that the crate `array_init` is quite good at this, and no unsafe 
any more.



-- 
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: issues-unsubscr...@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to