File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 1515// specific language governing permissions and limitations 
1616// under the License. 
1717
18- use  datafusion:: logical_plan:: LogicalPlanBuilder ; 
18+ use  datafusion:: logical_plan:: { LogicalPlanBuilder ,  UNNAMED_TABLE } ; 
19+ use  tempfile:: TempDir ; 
1920
2021use  super :: * ; 
2122
@@ -179,7 +180,7 @@ async fn projection_on_table_scan() -> Result<()> {
179180#[ tokio:: test]  
180181async  fn  preserve_nullability_on_projection ( )  -> Result < ( ) >  { 
181182    let  tmp_dir = TempDir :: new ( ) ?; 
182-     let  ctx = create_ctx ( & tmp_dir,  1 ) . await ?; 
183+     let  ctx = partitioned_csv :: create_ctx ( & tmp_dir,  1 ) . await ?; 
183184
184185    let  schema:  Schema  = ctx. table ( "test" ) . unwrap ( ) . schema ( ) . clone ( ) . into ( ) ; 
185186    assert ! ( !schema. field_with_name( "c1" ) ?. is_nullable( ) ) ; 
@@ -254,3 +255,13 @@ async fn projection_on_memory_scan() -> Result<()> {
254255
255256    Ok ( ( ) ) 
256257} 
258+ 
259+ fn  assert_fields_eq ( plan :  & LogicalPlan ,  expected :  Vec < & str > )  { 
260+     let  actual:  Vec < String >  = plan
261+         . schema ( ) 
262+         . fields ( ) 
263+         . iter ( ) 
264+         . map ( |f| f. name ( ) . clone ( ) ) 
265+         . collect ( ) ; 
266+     assert_eq ! ( actual,  expected) ; 
267+ } 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments