File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
crates/polars-plan/src/plans/optimizer/projection_pushdown Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -71,13 +71,13 @@ pub(super) fn process_projection(
7171 } else {
7272 // Select the last column projection.
7373 let mut name = None ;
74- for ( _, plan) in ( & * lp_arena) . iter ( input) {
74+ ' outer : for ( _, plan) in ( & * lp_arena) . iter ( input) {
7575 match plan {
7676 IR :: Select { expr : exprs, .. } | IR :: HStack { exprs, .. } => {
7777 for e in exprs {
7878 if !e. is_scalar ( expr_arena) {
7979 name = Some ( e. output_name ( ) ) ;
80- break ;
80+ break ' outer ;
8181 }
8282 }
8383 } ,
Original file line number Diff line number Diff line change @@ -63,3 +63,10 @@ def test_scalar_len_20046() -> None:
6363 .item ()
6464 == 3
6565 )
66+
67+ q = pl .LazyFrame ({"a" : range (3 )}).select (
68+ pl .first ("a" ),
69+ pl .col ("a" ).alias ("b" ),
70+ )
71+
72+ assert q .select (pl .len ()).collect ().item () == 3
You can’t perform that action at this time.
0 commit comments