@@ -8,15 +8,14 @@ use datafusion::execution::context::SessionContext;
88use datafusion:: logical_expr:: dml:: InsertOp ;
99use datafusion:: logical_expr:: CreateExternalTable ;
1010use datafusion:: physical_plan:: collect;
11- use datafusion_federation:: schema_cast:: record_convert:: try_cast_to;
1211use datafusion_table_providers:: duckdb:: DuckDBTableProviderFactory ;
1312use rstest:: rstest;
1413use std:: collections:: HashMap ;
1514use std:: sync:: Arc ;
1615
1716async fn arrow_duckdb_round_trip (
1817 arrow_record : RecordBatch ,
19- source_schema : SchemaRef ,
18+ _source_schema : SchemaRef ,
2019 table_name : & str ,
2120) {
2221 let factory = DuckDBTableProviderFactory :: new ( duckdb:: AccessMode :: ReadWrite ) ;
@@ -68,7 +67,6 @@ async fn arrow_duckdb_round_trip(
6867 . expect ( "DataFrame should be created from query" ) ;
6968
7069 let record_batch = df. collect ( ) . await . expect ( "RecordBatch should be collected" ) ;
71- let casted_record = try_cast_to ( record_batch[ 0 ] . clone ( ) , source_schema) . unwrap ( ) ;
7270
7371 tracing:: debug!( "Original Arrow Record Batch: {:?}" , arrow_record. columns( ) ) ;
7472 tracing:: debug!(
@@ -80,7 +78,7 @@ async fn arrow_duckdb_round_trip(
8078 assert_eq ! ( record_batch. len( ) , 1 ) ;
8179 assert_eq ! ( record_batch[ 0 ] . num_rows( ) , arrow_record. num_rows( ) ) ;
8280 assert_eq ! ( record_batch[ 0 ] . num_columns( ) , arrow_record. num_columns( ) ) ;
83- assert_eq ! ( casted_record , arrow_record) ;
81+ assert_eq ! ( record_batch [ 0 ] , arrow_record) ;
8482}
8583
8684#[ rstest]
0 commit comments