sdd commented on code in PR #231: URL: https://github.com/apache/iceberg-rust/pull/231#discussion_r1517228198
########## 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: It feels like a bit of a premature optimisation to introduce `unsafe` and `MaybeUninit` here when safe code will probably do. -- 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