yjhjstz commented on code in PR #1933:
URL: https://github.com/apache/cloudberry/pull/1933#discussion_r3873904096


##########
src/test/regress/expected/eagerfree.out:
##########
@@ -1379,21 +1379,20 @@ where i < (select count(*) from smallt where smallt.i = 
smallt2.i) order by 1,2,
 
 explain select smallt2.* from smallt2
 where i < (select count(*) from smallt where smallt.i = smallt2.i);
-                                      QUERY PLAN                               
        
----------------------------------------------------------------------------------------
- Gather Motion 3:1  (slice1; segments: 3)  (cost=5.10..8.08 rows=17 width=15)
-   ->  Hash Join  (cost=5.10..8.08 rows=6 width=15)
-         Hash Cond: smallt2.i = "Expr_SUBQUERY".csq_c0
-         Join Filter: smallt2.i < "Expr_SUBQUERY".csq_c1
-         ->  Seq Scan on smallt2  (cost=0.00..2.50 rows=17 width=15)
-         ->  Hash  (cost=4.97..4.97 rows=4 width=12)
-               ->  Subquery Scan on "Expr_SUBQUERY"  (cost=4.75..4.97 rows=4 
width=12)
-                     ->  HashAggregate  (cost=4.75..4.88 rows=4 width=12)
-                           Filter: smallt.i < count(*)
+                                                   QUERY PLAN                  
                                  
+-----------------------------------------------------------------------------------------------------------------
+ Gather Motion 3:1  (slice1; segments: 3)  (cost=1.59..3.97 rows=17 width=15)
+   ->  Hash Left Join  (cost=1.59..2.86 rows=6 width=15)
+         Hash Cond: (smallt2.i = "Expr_SUBQUERY".csq_c0)
+         Filter: (smallt2.i < CASE WHEN "Expr_SUBQUERY".csq_c1 THEN 
"Expr_SUBQUERY".csq_c2 ELSE '0'::bigint END)
+         ->  Seq Scan on smallt2  (cost=0.00..1.17 rows=17 width=15)
+         ->  Hash  (cost=1.54..1.54 rows=3 width=13)
+               ->  Subquery Scan on "Expr_SUBQUERY"  (cost=1.50..1.54 rows=3 
width=13)
+                     ->  HashAggregate  (cost=1.50..1.53 rows=3 width=13)
                            Group Key: smallt.i
-                           ->  Seq Scan on smallt  (cost=0.00..4.00 rows=34 
width=4)
+                           ->  Seq Scan on smallt  (cost=0.00..1.33 rows=33 
width=4)
  Optimizer: Postgres query optimizer
-(12 rows)
+(11 rows)

Review Comment:
   test sql: `select * from t1 where t1.a > (select count(*) + count(*) over () 
from t2 where t2.a = t1.b);`
   
   got ` ERROR: WindowFunc found in non-WindowAgg plan node (execExpr.c:1188)`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to