mohammadnaqvi04 commented on code in PR #25391:
URL: https://github.com/apache/datafusion/pull/25391#discussion_r4321131744


##########
datafusion/optimizer/src/decorrelate_predicate_subquery.rs:
##########
@@ -783,13 +784,16 @@ fn build_join(
 ) -> Result<Option<BuiltJoin>> {
     let mut pull_up = PullUpCorrelatedExpr::new()
         .with_in_predicate_opt(in_predicate_opt.cloned())
-        .with_exists_sub_query(in_predicate_opt.is_none());
+        .with_exists_sub_query(in_predicate_opt.is_none())
+        .with_need_handle_count_bug(true);

Review Comment:
   Good catch, fixed. Changed to 
`with_need_handle_count_bug(in_predicate_opt.is_none())` now, so IN/NOT IN 
never enters count-bug handling. Took your suggested diff directly. The 
`not_impl_err` was dead after that change, so I removed it and dropped 
`in_predicate_opt` from `build_join_with_count_bug`'s signature since it's 
unused now.



-- 
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