@@ -860,7 +860,7 @@ fn project_dfschema(schema: &DFSchema, indices: &HashSet<usize>) -> Result<DFSch
860860 . filter_map ( |i| {
861861 indices. contains ( & i) . then_some ( {
862862 let ( reference, field) = schema. qualified_field ( i) ;
863- ( reference. cloned ( ) , Arc :: new ( field. clone ( ) ) )
863+ ( reference. cloned ( ) , field. clone ( ) )
864864 } )
865865 } )
866866 . collect_vec ( ) ;
@@ -1940,19 +1940,20 @@ mod test {
19401940 " ,
19411941 projection : & [ "year" ] ,
19421942 expected_plan : vec ! [
1943- "+--------------+--------------------------------------------------------------------+" ,
1944- "| plan_type | plan |" ,
1945- "+--------------+--------------------------------------------------------------------+" ,
1946- "| logical_plan | Union |" ,
1947- "| | Projection: coalesce(CAST(t1.year AS Utf8View), t2.year) AS year |" ,
1948- "| | Full Join: Using CAST(t1.year AS Utf8View) = t2.year |" ,
1949- "| | SubqueryAlias: t1 |" ,
1950- "| | Projection: t1.column1 AS year |" ,
1951- "| | TableScan: t1 projection=[column1] |" ,
1952- "| | SubqueryAlias: t2 |" ,
1953- "| | TableScan: t2 projection=[year] |" ,
1954- "| | TableScan: t3 projection=[year] |" ,
1955- "+--------------+--------------------------------------------------------------------+" ,
1943+ "+--------------+---------------------------------------------------------------------------------------------------+" ,
1944+ "| plan_type | plan |" ,
1945+ "+--------------+---------------------------------------------------------------------------------------------------+" ,
1946+ "| logical_plan | Union |" ,
1947+ "| | Projection: CASE WHEN __common_expr_2 IS NOT NULL THEN __common_expr_2 ELSE t2.year END AS year |" ,
1948+ "| | Projection: CAST(t1.year AS Utf8View) AS __common_expr_2, t2.year |" ,
1949+ "| | Full Join: Using CAST(t1.year AS Utf8View) = t2.year |" ,
1950+ "| | SubqueryAlias: t1 |" ,
1951+ "| | Projection: t1.column1 AS year |" ,
1952+ "| | TableScan: t1 projection=[column1] |" ,
1953+ "| | SubqueryAlias: t2 |" ,
1954+ "| | TableScan: t2 projection=[year] |" ,
1955+ "| | TableScan: t3 projection=[year] |" ,
1956+ "+--------------+---------------------------------------------------------------------------------------------------+" ,
19561957 ] ,
19571958 expected_output : vec ! [
19581959 "+------+" ,
0 commit comments