File tree Expand file tree Collapse file tree 2 files changed +19
-13
lines changed Expand file tree Collapse file tree 2 files changed +19
-13
lines changed Original file line number Diff line number Diff line change 2222
2323from  __future__ import  annotations 
2424
25- from  ._internal  import  (
26-     expr  as  expr_internal ,
27-     LogicalPlan ,
28-     functions  as  functions_internal ,
29- )
30- from  datafusion .common  import  NullTreatment , RexType , DataTypeMap 
3125from  typing  import  Any , Optional , Type 
32- from   typing_extensions   import   deprecated 
26+ 
3327import  pyarrow  as  pa 
28+ from  datafusion .common  import  DataTypeMap , NullTreatment , RexType 
29+ from  typing_extensions  import  deprecated 
30+ 
31+ from  ._internal  import  LogicalPlan 
32+ from  ._internal  import  expr  as  expr_internal 
33+ from  ._internal  import  functions  as  functions_internal 
3434
3535# The following are imported from the internal representation. We may choose to 
3636# give these all proper wrappers, or to simply leave as is. These were added 
@@ -196,7 +196,9 @@ def to_variant(self) -> Any:
196196        """Convert this expression into a python object if possible.""" 
197197        return  self .expr .to_variant ()
198198
199-     @deprecated ("display_name() is deprecated. Use :py:meth:`~Expr.schema_name` instead" ) 
199+     @deprecated ( 
200+         "display_name() is deprecated. Use :py:meth:`~Expr.schema_name` instead"  
201+     ) 
200202    def  display_name (self ) ->  str :
201203        """Returns the name of this expression as it should appear in a schema. 
202204
Original file line number Diff line number Diff line change 1515# specific language governing permissions and limitations 
1616# under the License. 
1717
18+ import  pyarrow 
19+ import  pytest 
1820from  datafusion  import  SessionContext , col 
19- from  datafusion .expr  import  Column , Literal , BinaryExpr , AggregateFunction 
2021from  datafusion .expr  import  (
21-     Projection ,
22-     Filter ,
2322    Aggregate ,
23+     AggregateFunction ,
24+     BinaryExpr ,
25+     Column ,
26+     Filter ,
2427    Limit ,
28+     Literal ,
29+     Projection ,
2530    Sort ,
2631    TableScan ,
2732)
28- import  pyarrow 
29- import  pytest 
3033
3134
3235@pytest .fixture  
@@ -196,6 +199,7 @@ def test_expr_getitem() -> None:
196199
197200def  test_display_name_deprecation ():
198201    import  warnings 
202+ 
199203    expr  =  col ("foo" )
200204    with  warnings .catch_warnings (record = True ) as  w :
201205        # Cause all warnings to always be triggered 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments