Jesse-Bakker opened a new pull request, #8312: URL: https://github.com/apache/arrow-datafusion/pull/8312
## Which issue does this PR close? Part of #3725 ## Rationale for this change In some cases, it is possible to prove that a Filter only ever produces one row. In those cases, such a filter may be used in a scalar subquery to ensure it is in fact scalar, allowing for more flexible use of scalar subqueries. ## What changes are included in this PR? This adds an `is_scalar()` method to `Filter`, which will check if there is a unique functional dependence which is covered by the `Filter`'s predicate. This is used in `LogicalPlan::max_rows()` to provide a tighter bound on the maximum number of rows returned in the presence of `Filter`s. ## Are these changes tested? This is directly tested with a unit test and with a `sqllogictest` that exercises the more flexible use of scalar subqueries. ## Are there any user-facing changes? Scalar subqueries are more flexible. Previous constraints were not documented as far as I can tell -- 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]
