File tree 5 files changed +12
-14
lines changed 5 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,9 @@ mod tests {
138
138
fn test_py_scalar ( ) {
139
139
init_python ( ) ;
140
140
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) ]
141
144
Python :: with_gil ( |py| {
142
145
let scalar_float = ScalarValue :: Float64 ( Some ( 12.34 ) ) ;
143
146
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 {
1148
1148
/// This method first checks if the statistics for the given file are already cached.
1149
1149
/// If they are, it returns the cached statistics.
1150
1150
/// 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 ,
1153
1153
ctx : & SessionState ,
1154
1154
store : & Arc < dyn ObjectStore > ,
1155
1155
part_file : & PartitionedFile ,
Original file line number Diff line number Diff line change @@ -1047,7 +1047,7 @@ impl SessionContext {
1047
1047
Ok ( table)
1048
1048
}
1049
1049
1050
- async fn find_and_deregister < ' a > (
1050
+ async fn find_and_deregister (
1051
1051
& self ,
1052
1052
table_ref : impl Into < TableReference > ,
1053
1053
table_type : TableType ,
@@ -1481,10 +1481,7 @@ impl SessionContext {
1481
1481
/// provided reference.
1482
1482
///
1483
1483
/// [`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 > {
1488
1485
let table_ref: TableReference = table_ref. into ( ) ;
1489
1486
let provider = self . table_provider ( table_ref. clone ( ) ) . await ?;
1490
1487
let plan = LogicalPlanBuilder :: scan (
@@ -1511,7 +1508,7 @@ impl SessionContext {
1511
1508
}
1512
1509
1513
1510
/// Return a [`TableProvider`] for the specified table.
1514
- pub async fn table_provider < ' a > (
1511
+ pub async fn table_provider (
1515
1512
& self ,
1516
1513
table_ref : impl Into < TableReference > ,
1517
1514
) -> Result < Arc < dyn TableProvider > > {
Original file line number Diff line number Diff line change @@ -159,9 +159,7 @@ pub trait DynEq {
159
159
160
160
impl < T : Eq + Any > DynEq for T {
161
161
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 )
165
163
}
166
164
}
167
165
Original file line number Diff line number Diff line change @@ -291,9 +291,9 @@ impl PhysicalSortRequirement {
291
291
/// Returns whether this requirement is equal or more specific than `other`.
292
292
pub fn compatible ( & self , other : & PhysicalSortRequirement ) -> bool {
293
293
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 ) )
297
297
}
298
298
299
299
#[ deprecated( since = "43.0.0" , note = "use LexRequirement::from_lex_ordering" ) ]
You can’t perform that action at this time.
0 commit comments