File tree Expand file tree Collapse file tree
datafusion/proto/src/physical_plan Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -684,17 +684,13 @@ impl protobuf::PhysicalPlanNode {
684684 } ) ?;
685685
686686 let filter_selectivity = filter. default_filter_selectivity . try_into ( ) ;
687- let projection = if !filter. projection . is_empty ( ) {
688- Some (
689- filter
690- . projection
691- . iter ( )
692- . map ( |i| * i as usize )
693- . collect :: < Vec < _ > > ( ) ,
694- )
695- } else {
696- None
697- } ;
687+ let projection = Some (
688+ filter
689+ . projection
690+ . iter ( )
691+ . map ( |i| * i as usize )
692+ . collect :: < Vec < _ > > ( ) ,
693+ ) ;
698694
699695 let filter = FilterExecBuilder :: new ( predicate, input)
700696 . apply_projection ( projection) ?
@@ -2364,9 +2360,10 @@ impl protobuf::PhysicalPlanNode {
23642360 . physical_expr_to_proto ( exec. predicate ( ) , codec) ?,
23652361 ) ,
23662362 default_filter_selectivity : exec. default_selectivity ( ) as u32 ,
2367- projection : exec. projection ( ) . as_ref ( ) . map_or_else ( Vec :: new, |v| {
2368- v. iter ( ) . map ( |x| * x as u32 ) . collect :: < Vec < u32 > > ( )
2369- } ) ,
2363+ projection : exec. projection ( ) . as_ref ( ) . map_or (
2364+ ( 0 ..exec. schema ( ) . fields ( ) . len ( ) as u32 ) . collect :: < Vec < u32 > > ( ) ,
2365+ |v| v. iter ( ) . map ( |x| * x as u32 ) . collect :: < Vec < u32 > > ( ) ,
2366+ ) ,
23702367 batch_size : exec. batch_size ( ) as u32 ,
23712368 fetch : exec. fetch ( ) . map ( |f| f as u32 ) ,
23722369 } ,
You can’t perform that action at this time.
0 commit comments