@@ -26,20 +26,20 @@ pub use tuple::batch_constant;
2626///
2727/// # Safety
2828///
29- /// For every view returned by [`varying `](Self::varying ), every index below
30- /// [`varying_len `](Self::varying_len ) **must** satisfy the safety contract of
31- /// [`get_varying_unchecked `](Self::get_varying_unchecked ). Shared execution relies on this proof to
32- /// perform unchecked reads after one pre-loop length check.
29+ /// For every view returned by [`view `](Self::view ), every index below
30+ /// [`view_len `](Self::view_len ) **must** satisfy the safety contract of
31+ /// [`get_from_view_unchecked `](Self::get_from_view_unchecked ). Shared execution relies on this
32+ /// proof to perform unchecked reads after one pre-loop length check.
3333pub unsafe trait InputElement : ' static {
3434 /// The decoded column representation supporting `O(1)` row access.
3535 type Column ;
3636
37- /// The view of a varying decoded column read by the hot row loop.
37+ /// The view of a per-row decoded column read by the hot row loop.
3838 ///
3939 /// This may borrow a cheaper representation than [`Column`](Self::Column). Primitive elements,
4040 /// for example, expose a slice so its pointer and length are loop invariants rather than
4141 /// re-reading a [`Buffer`](vortex_buffer::Buffer) descriptor for every row.
42- type Varying < ' a > ;
42+ type View < ' a > ;
4343
4444 /// The borrowed element value handed to a row closure.
4545 type Elem < ' a > ;
@@ -48,8 +48,8 @@ pub unsafe trait InputElement: 'static {
4848 ///
4949 /// Arrays only guarantee payloads for valid rows. This is `false` when a null row's stored
5050 /// offset or pointer may not address anything, and `true` only when [`decode`](Self::decode),
51- /// [`get`](Self::get), [`varying `](Self::varying ), [`varying_len `](Self::varying_len ), and
52- /// [`get_varying `](Self::get_varying ) remain safe and correct for null rows.
51+ /// [`get`](Self::get), [`view `](Self::view ), [`view_len `](Self::view_len ), and
52+ /// [`get_from_view `](Self::get_from_view ) remain safe and correct for null rows.
5353 ///
5454 /// Dense execution requires this of every argument; otherwise the row layer executes only
5555 /// valid rows.
@@ -105,29 +105,29 @@ pub unsafe trait InputElement: 'static {
105105 ///
106106 /// Called once before the hot loop. Constants do not use this view because the tuple adapter
107107 /// keeps their one-row decoded representation separate.
108- fn varying ( column : & Self :: Column ) -> Self :: Varying < ' _ > ;
108+ fn view ( column : & Self :: Column ) -> Self :: View < ' _ > ;
109109
110- /// Number of rows addressable through a [`Varying `](Self::Varying) view .
110+ /// Number of rows addressable through a [`View `](Self::View) .
111111 ///
112112 /// Every index below this length must be valid for
113- /// [`get_varying_unchecked `](Self::get_varying_unchecked ).
114- fn varying_len ( column : & Self :: Varying < ' _ > ) -> usize ;
113+ /// [`get_from_view_unchecked `](Self::get_from_view_unchecked ).
114+ fn view_len ( view : & Self :: View < ' _ > ) -> usize ;
115115
116- /// Read one row from a [`Varying `](Self::Varying) view .
117- fn get_varying < ' a > ( column : & Self :: Varying < ' a > , index : usize ) -> Self :: Elem < ' a >
116+ /// Read one row from a [`View `](Self::View) .
117+ fn get_from_view < ' a > ( view : & Self :: View < ' a > , index : usize ) -> Self :: Elem < ' a >
118118 where
119119 Self : ' a ;
120120
121121 /// Read one row without checking that `index` is in bounds.
122122 ///
123123 /// # Safety
124124 ///
125- /// `index` must be less than [`varying_len `](Self::varying_len ) for `column `.
126- unsafe fn get_varying_unchecked < ' a > ( column : & Self :: Varying < ' a > , index : usize ) -> Self :: Elem < ' a >
125+ /// `index` must be less than [`view_len `](Self::view_len ) for `view `.
126+ unsafe fn get_from_view_unchecked < ' a > ( view : & Self :: View < ' a > , index : usize ) -> Self :: Elem < ' a >
127127 where
128128 Self : ' a ,
129129 {
130- Self :: get_varying ( column , index)
130+ Self :: get_from_view ( view , index)
131131 }
132132}
133133
0 commit comments