@@ -2,6 +2,7 @@ use crate::arrow_record_batch_gen::*;
22use  arrow:: array:: RecordBatch ; 
33use  arrow:: datatypes:: SchemaRef ; 
44use  datafusion:: execution:: context:: SessionContext ; 
5+ #[ cfg( feature = "sqlite-federation" ) ]  
56use  datafusion_federation:: schema_cast:: record_convert:: try_cast_to; 
67use  datafusion_table_providers:: sql:: arrow_sql_gen:: statement:: { 
78    CreateTableBuilder ,  InsertBuilder , 
@@ -68,6 +69,7 @@ async fn arrow_sqlite_round_trip(
6869
6970    let  record_batch = df. collect ( ) . await . expect ( "RecordBatch should be collected" ) ; 
7071
72+     #[ cfg( feature = "sqlite-federation" ) ]  
7173    let  casted_record = try_cast_to ( record_batch[ 0 ] . clone ( ) ,  source_schema) . unwrap ( ) ; 
7274
7375    tracing:: debug!( "Original Arrow Record Batch: {:?}" ,  arrow_record. columns( ) ) ; 
@@ -80,6 +82,7 @@ async fn arrow_sqlite_round_trip(
8082    assert_eq ! ( record_batch. len( ) ,  1 ) ; 
8183    assert_eq ! ( record_batch[ 0 ] . num_rows( ) ,  arrow_record. num_rows( ) ) ; 
8284    assert_eq ! ( record_batch[ 0 ] . num_columns( ) ,  arrow_record. num_columns( ) ) ; 
85+     #[ cfg( feature = "sqlite-federation" ) ]  
8386    assert_eq ! ( casted_record,  arrow_record) ; 
8487} 
8588
0 commit comments