@@ -112,24 +112,12 @@ impl From<PhysicalSortRequirement> for PhysicalSortExpr {
112112 }
113113}
114114
115- impl From < & PhysicalSortRequirement > for PhysicalSortExpr {
116- fn from ( value : & PhysicalSortRequirement ) -> Self {
117- value. clone ( ) . into_sort_expr ( )
118- }
119- }
120-
121115impl From < PhysicalSortExpr > for PhysicalSortRequirement {
122116 fn from ( value : PhysicalSortExpr ) -> Self {
123117 PhysicalSortRequirement :: new ( value. expr , Some ( value. options ) )
124118 }
125119}
126120
127- impl From < & PhysicalSortExpr > for PhysicalSortRequirement {
128- fn from ( value : & PhysicalSortExpr ) -> Self {
129- PhysicalSortRequirement :: from ( value. clone ( ) )
130- }
131- }
132-
133121impl PartialEq for PhysicalSortRequirement {
134122 fn eq ( & self , other : & PhysicalSortRequirement ) -> bool {
135123 self . options == other. options && self . expr . eq ( & other. expr )
@@ -190,13 +178,14 @@ impl PhysicalSortRequirement {
190178 /// Returns [`PhysicalSortRequirement`] that requires the exact
191179 /// sort of the [`PhysicalSortExpr`]s in `ordering`
192180 ///
193- /// This method is designed for
181+ /// This method takes `&'a PhysicalSortExpr` to make it easy to
194182 /// use implementing [`ExecutionPlan::required_input_ordering`].
195183 pub fn from_sort_exprs < ' a > (
196184 ordering : impl IntoIterator < Item = & ' a PhysicalSortExpr > ,
197185 ) -> Vec < PhysicalSortRequirement > {
198186 ordering
199187 . into_iter ( )
188+ . cloned ( )
200189 . map ( PhysicalSortRequirement :: from)
201190 . collect ( )
202191 }
0 commit comments