kosiew commented on issue #850:
URL:
https://github.com/apache/datafusion-python/issues/850#issuecomment-2478575117
Here is a rewritten workaround that avoids a subquery in the WHERE clause:
```
with t as
(
select left1,width1,min(height)min_height
from
rectangle a cross join unnest(generate_series(1,1000,1))t(left1)cross join
unnest(generate_series(1,1000,1))t1(width1)
where left1+width1-1<=1000
and id between left1 and left1+width1-1
group by left1,width1
),
max_area as (
select max(min_height*width1) as max from t
)
select *,min_height*width1
from t
cross join max_area
where min_height*width1 = max_area.max
```
--
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]