File tree Expand file tree Collapse file tree 5 files changed +12
-14
lines changed Expand file tree Collapse file tree 5 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,9 @@ mod tests {
138138 fn test_py_scalar ( ) {
139139 init_python ( ) ;
140140
141+ // TODO: remove this attribute when bumping pyo3 to v0.23.0
142+ // See: <https://github.com/PyO3/pyo3/blob/v0.23.0/guide/src/migration.md#gil-refs-feature-removed>
143+ #[ allow( unexpected_cfgs) ]
141144 Python :: with_gil ( |py| {
142145 let scalar_float = ScalarValue :: Float64 ( Some ( 12.34 ) ) ;
143146 let py_float = scalar_float. into_py ( py) . call_method0 ( py, "as_py" ) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -1148,8 +1148,8 @@ impl ListingTable {
11481148 /// This method first checks if the statistics for the given file are already cached.
11491149 /// If they are, it returns the cached statistics.
11501150 /// If they are not, it infers the statistics from the file and stores them in the cache.
1151- async fn do_collect_statistics < ' a > (
1152- & ' a self ,
1151+ async fn do_collect_statistics (
1152+ & self ,
11531153 ctx : & SessionState ,
11541154 store : & Arc < dyn ObjectStore > ,
11551155 part_file : & PartitionedFile ,
Original file line number Diff line number Diff line change @@ -1047,7 +1047,7 @@ impl SessionContext {
10471047 Ok ( table)
10481048 }
10491049
1050- async fn find_and_deregister < ' a > (
1050+ async fn find_and_deregister (
10511051 & self ,
10521052 table_ref : impl Into < TableReference > ,
10531053 table_type : TableType ,
@@ -1481,10 +1481,7 @@ impl SessionContext {
14811481 /// provided reference.
14821482 ///
14831483 /// [`register_table`]: SessionContext::register_table
1484- pub async fn table < ' a > (
1485- & self ,
1486- table_ref : impl Into < TableReference > ,
1487- ) -> Result < DataFrame > {
1484+ pub async fn table ( & self , table_ref : impl Into < TableReference > ) -> Result < DataFrame > {
14881485 let table_ref: TableReference = table_ref. into ( ) ;
14891486 let provider = self . table_provider ( table_ref. clone ( ) ) . await ?;
14901487 let plan = LogicalPlanBuilder :: scan (
@@ -1511,7 +1508,7 @@ impl SessionContext {
15111508 }
15121509
15131510 /// Return a [`TableProvider`] for the specified table.
1514- pub async fn table_provider < ' a > (
1511+ pub async fn table_provider (
15151512 & self ,
15161513 table_ref : impl Into < TableReference > ,
15171514 ) -> Result < Arc < dyn TableProvider > > {
Original file line number Diff line number Diff line change @@ -159,9 +159,7 @@ pub trait DynEq {
159159
160160impl < T : Eq + Any > DynEq for T {
161161 fn dyn_eq ( & self , other : & dyn Any ) -> bool {
162- other
163- . downcast_ref :: < Self > ( )
164- . map_or ( false , |other| other == self )
162+ other. downcast_ref :: < Self > ( ) == Some ( self )
165163 }
166164}
167165
Original file line number Diff line number Diff line change @@ -291,9 +291,9 @@ impl PhysicalSortRequirement {
291291 /// Returns whether this requirement is equal or more specific than `other`.
292292 pub fn compatible ( & self , other : & PhysicalSortRequirement ) -> bool {
293293 self . expr . eq ( & other. expr )
294- && other. options . map_or ( true , |other_opts| {
295- self . options . map_or ( false , |opts| opts == other_opts )
296- } )
294+ && other
295+ . options
296+ . map_or ( true , |other_opts| self . options == Some ( other_opts ) )
297297 }
298298
299299 #[ deprecated( since = "43.0.0" , note = "use LexRequirement::from_lex_ordering" ) ]
You can’t perform that action at this time.
0 commit comments