@@ -268,17 +268,16 @@ impl AnalysisExpr for BinaryExpr {
268268 }
269269}
270270
271- /// Create a new `BinaryExpr` using the `Eq` operator.
271+ /// Create a new [ `BinaryExpr`] using the [ `Eq`](crate::Operator::Eq) operator.
272272///
273273/// ## Example usage
274274///
275275/// ```
276- /// use vortex_array::arrays::{BoolArray, PrimitiveArray };
277- /// use vortex_array::{Array, IntoArray, ToCanonical};
278- /// use vortex_array::validity::Validity;
279- /// use vortex_buffer::buffer;
280- /// use vortex_expr::{eq, root, lit, Scope};
281- ///
276+ /// # use vortex_array::arrays::{BoolArray, PrimitiveArray };
277+ /// # use vortex_array::{Array, IntoArray, ToCanonical};
278+ /// # use vortex_array::validity::Validity;
279+ /// # use vortex_buffer::buffer;
280+ /// # use vortex_expr::{eq, root, lit, Scope};
282281/// let xs = PrimitiveArray::new(buffer![1i32, 2i32, 3i32], Validity::NonNullable);
283282/// let result = eq(root(), lit(3)).evaluate(&Scope::new(xs.to_array())).unwrap();
284283///
@@ -291,17 +290,16 @@ pub fn eq(lhs: ExprRef, rhs: ExprRef) -> ExprRef {
291290 BinaryExpr :: new ( lhs, Operator :: Eq , rhs) . into_expr ( )
292291}
293292
294- /// Create a new `BinaryExpr` using the `NotEq` operator.
293+ /// Create a new [ `BinaryExpr`] using the [ `NotEq`](crate::Operator::NotEq) operator.
295294///
296295/// ## Example usage
297296///
298297/// ```
299- /// use vortex_array::arrays::{BoolArray, PrimitiveArray };
300- /// use vortex_array::{IntoArray, ToCanonical};
301- /// use vortex_array::validity::Validity;
302- /// use vortex_buffer::buffer;
303- /// use vortex_expr::{root, lit, not_eq, Scope};
304- ///
298+ /// # use vortex_array::arrays::{BoolArray, PrimitiveArray };
299+ /// # use vortex_array::{IntoArray, ToCanonical};
300+ /// # use vortex_array::validity::Validity;
301+ /// # use vortex_buffer::buffer;
302+ /// # use vortex_expr::{root, lit, not_eq, Scope};
305303/// let xs = PrimitiveArray::new(buffer![1i32, 2i32, 3i32], Validity::NonNullable);
306304/// let result = not_eq(root(), lit(3)).evaluate(&Scope::new(xs.to_array())).unwrap();
307305///
@@ -314,17 +312,16 @@ pub fn not_eq(lhs: ExprRef, rhs: ExprRef) -> ExprRef {
314312 BinaryExpr :: new ( lhs, Operator :: NotEq , rhs) . into_expr ( )
315313}
316314
317- /// Create a new `BinaryExpr` using the `Gte` operator.
315+ /// Create a new [ `BinaryExpr`] using the [ `Gte`](crate::Operator::Gte) operator.
318316///
319317/// ## Example usage
320318///
321319/// ```
322- /// use vortex_array::arrays::{BoolArray, PrimitiveArray };
323- /// use vortex_array::{IntoArray, ToCanonical};
324- /// use vortex_array::validity::Validity;
325- /// use vortex_buffer::buffer;
326- /// use vortex_expr::{gt_eq, root, lit, Scope};
327- ///
320+ /// # use vortex_array::arrays::{BoolArray, PrimitiveArray };
321+ /// # use vortex_array::{IntoArray, ToCanonical};
322+ /// # use vortex_array::validity::Validity;
323+ /// # use vortex_buffer::buffer;
324+ /// # use vortex_expr::{gt_eq, root, lit, Scope};
328325/// let xs = PrimitiveArray::new(buffer![1i32, 2i32, 3i32], Validity::NonNullable);
329326/// let result = gt_eq(root(), lit(3)).evaluate(&Scope::new(xs.to_array())).unwrap();
330327///
@@ -337,17 +334,16 @@ pub fn gt_eq(lhs: ExprRef, rhs: ExprRef) -> ExprRef {
337334 BinaryExpr :: new ( lhs, Operator :: Gte , rhs) . into_expr ( )
338335}
339336
340- /// Create a new `BinaryExpr` using the `Gt` operator.
337+ /// Create a new [ `BinaryExpr`] using the [ `Gt`](crate::Operator::Gt) operator.
341338///
342339/// ## Example usage
343340///
344341/// ```
345- /// use vortex_array::arrays::{BoolArray, PrimitiveArray };
346- /// use vortex_array::{IntoArray, ToCanonical};
347- /// use vortex_array::validity::Validity;
348- /// use vortex_buffer::buffer;
349- /// use vortex_expr::{gt, root, lit, Scope};
350- ///
342+ /// # use vortex_array::arrays::{BoolArray, PrimitiveArray };
343+ /// # use vortex_array::{IntoArray, ToCanonical};
344+ /// # use vortex_array::validity::Validity;
345+ /// # use vortex_buffer::buffer;
346+ /// # use vortex_expr::{gt, root, lit, Scope};
351347/// let xs = PrimitiveArray::new(buffer![1i32, 2i32, 3i32], Validity::NonNullable);
352348/// let result = gt(root(), lit(2)).evaluate(&Scope::new(xs.to_array())).unwrap();
353349///
@@ -360,17 +356,16 @@ pub fn gt(lhs: ExprRef, rhs: ExprRef) -> ExprRef {
360356 BinaryExpr :: new ( lhs, Operator :: Gt , rhs) . into_expr ( )
361357}
362358
363- /// Create a new `BinaryExpr` using the `Lte` operator.
359+ /// Create a new [ `BinaryExpr`] using the [ `Lte`](crate::Operator::Lte) operator.
364360///
365361/// ## Example usage
366362///
367363/// ```
368- /// use vortex_array::arrays::{BoolArray, PrimitiveArray };
369- /// use vortex_array::{IntoArray, ToCanonical};
370- /// use vortex_array::validity::Validity;
371- /// use vortex_buffer::buffer;
372- /// use vortex_expr::{root, lit, lt_eq, Scope};
373- ///
364+ /// # use vortex_array::arrays::{BoolArray, PrimitiveArray };
365+ /// # use vortex_array::{IntoArray, ToCanonical};
366+ /// # use vortex_array::validity::Validity;
367+ /// # use vortex_buffer::buffer;
368+ /// # use vortex_expr::{root, lit, lt_eq, Scope};
374369/// let xs = PrimitiveArray::new(buffer![1i32, 2i32, 3i32], Validity::NonNullable);
375370/// let result = lt_eq(root(), lit(2)).evaluate(&Scope::new(xs.to_array())).unwrap();
376371///
@@ -383,17 +378,16 @@ pub fn lt_eq(lhs: ExprRef, rhs: ExprRef) -> ExprRef {
383378 BinaryExpr :: new ( lhs, Operator :: Lte , rhs) . into_expr ( )
384379}
385380
386- /// Create a new `BinaryExpr` using the `Lt` operator.
381+ /// Create a new [ `BinaryExpr`] using the [ `Lt`](crate::Operator::Lt) operator.
387382///
388383/// ## Example usage
389384///
390385/// ```
391- /// use vortex_array::arrays::{BoolArray, PrimitiveArray };
392- /// use vortex_array::{IntoArray, ToCanonical};
393- /// use vortex_array::validity::Validity;
394- /// use vortex_buffer::buffer;
395- /// use vortex_expr::{root, lit, lt, Scope};
396- ///
386+ /// # use vortex_array::arrays::{BoolArray, PrimitiveArray };
387+ /// # use vortex_array::{IntoArray, ToCanonical};
388+ /// # use vortex_array::validity::Validity;
389+ /// # use vortex_buffer::buffer;
390+ /// # use vortex_expr::{root, lit, lt, Scope};
397391/// let xs = PrimitiveArray::new(buffer![1i32, 2i32, 3i32], Validity::NonNullable);
398392/// let result = lt(root(), lit(3)).evaluate(&Scope::new(xs.to_array())).unwrap();
399393///
@@ -406,15 +400,14 @@ pub fn lt(lhs: ExprRef, rhs: ExprRef) -> ExprRef {
406400 BinaryExpr :: new ( lhs, Operator :: Lt , rhs) . into_expr ( )
407401}
408402
409- /// Create a new `BinaryExpr` using the `Or` operator.
403+ /// Create a new [ `BinaryExpr`] using the [ `Or`](crate::Operator::Or) operator.
410404///
411405/// ## Example usage
412406///
413407/// ```
414- /// use vortex_array::arrays::BoolArray;
415- /// use vortex_array::{IntoArray, ToCanonical};
416- /// use vortex_expr::{root, lit, or, Scope};
417- ///
408+ /// # use vortex_array::arrays::BoolArray;
409+ /// # use vortex_array::{IntoArray, ToCanonical};
410+ /// # use vortex_expr::{root, lit, or, Scope};
418411/// let xs = BoolArray::from_iter(vec![true, false, true]);
419412/// let result = or(root(), lit(false)).evaluate(&Scope::new(xs.to_array())).unwrap();
420413///
@@ -439,15 +432,14 @@ where
439432 Some ( iter. rfold ( first, |acc, elem| or ( elem, acc) ) )
440433}
441434
442- /// Create a new `BinaryExpr` using the `And` operator.
435+ /// Create a new [ `BinaryExpr`] using the [ `And`](crate::Operator::And) operator.
443436///
444437/// ## Example usage
445438///
446439/// ```
447- /// use vortex_array::arrays::BoolArray;
448- /// use vortex_array::{IntoArray, ToCanonical};
449- /// use vortex_expr::{and, root, lit, Scope};
450- ///
440+ /// # use vortex_array::arrays::BoolArray;
441+ /// # use vortex_array::{IntoArray, ToCanonical};
442+ /// # use vortex_expr::{and, root, lit, Scope};
451443/// let xs = BoolArray::from_iter(vec![true, false, true]);
452444/// let result = and(root(), lit(true)).evaluate(&Scope::new(xs.to_array())).unwrap();
453445///
@@ -482,16 +474,15 @@ where
482474 iter. reduce ( and)
483475}
484476
485- /// Create a new `BinaryExpr` using the `CheckedAdd` operator.
477+ /// Create a new [ `BinaryExpr`] using the [`Add`](crate::Operator::Add) operator.
486478///
487479/// ## Example usage
488480///
489481/// ```
490- /// use vortex_array::IntoArray;
491- /// use vortex_array::arrow::IntoArrowArray as _;
492- /// use vortex_buffer::buffer;
493- /// use vortex_expr::{Scope, checked_add, lit, root};
494- ///
482+ /// # use vortex_array::IntoArray;
483+ /// # use vortex_array::arrow::IntoArrowArray as _;
484+ /// # use vortex_buffer::buffer;
485+ /// # use vortex_expr::{Scope, checked_add, lit, root};
495486/// let xs = buffer![1, 2, 3].into_array();
496487/// let result = checked_add(root(), lit(5))
497488/// .evaluate(&Scope::new(xs.to_array()))
0 commit comments