mohammadnaqvi04 commented on code in PR #25391:
URL: https://github.com/apache/datafusion/pull/25391#discussion_r4321153841
##########
datafusion/optimizer/src/decorrelate.rs:
##########
@@ -351,6 +368,49 @@ impl TreeNodeRewriter for PullUpCorrelatedExpr {
None
};
+ if self.pull_up_having_expr.is_some()
Review Comment:
Also took the suggested diff here. I added `self.exists_sub_query &&` to the
merge condition, so a scalar subquery's stacked filter no longer merges into
`pull_up_having_expr` and leaks a materialized default instead of NULL.
Verified against your repro.
--
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]