Xuanwo commented on code in PR #231: URL: https://github.com/apache/iceberg-rust/pull/231#discussion_r1519137105
########## crates/iceberg/src/expr/predicate.rs: ########## @@ -55,6 +60,24 @@ impl<T, const N: usize> LogicalExpression<T, N> { } } +impl<T: Bind, const N: usize> Bind for LogicalExpression<T, N> +where + T::Bound: Sized, +{ + type Bound = LogicalExpression<T::Bound, N>; + + fn bind(self, schema: SchemaRef, case_sensitive: bool) -> Result<Self::Bound> { + let mut outputs: [Option<Box<T::Bound>>; N] = array_init(|_| None); + for (i, input) in self.inputs.into_iter().enumerate() { + outputs[i] = Some(Box::new(input.bind(schema.clone(), case_sensitive)?)); + } + + // It's safe to use `unwrap` here since they are all `Some`. Review Comment: Makes sense. -- 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