matthewmturner commented on issue #7976:
URL: https://github.com/apache/datafusion/issues/7976#issuecomment-6460365389

   I am looking into this.  Started off by making sure its still an issue - 
which it is.
   
   ```
   > select a, random() as r from values (1), (2), (3), (4) as t('a') group by 
a having r > 0.5;
   +---+---------------------+
   | a | r                   |
   +---+---------------------+
   | 4 | 0.995627458014017   |
   | 3 | 0.43503817742472006 |
   +---+---------------------+
   2 row(s) fetched.
   Elapsed 0.003 seconds.
   ```
   
   I checked duckdb which at the time the ticket was created also had the issue 
but now reports this as an error - although they say "This is not yet 
supported" so maybe something similar to `I wonder if it is possible to 
eliminate this dereference step entirely and directly generate the same logical 
plan as the subquery.` is planned. I will look into that next.
   
   ```
   ❯ duckdb
   DuckDB v1.5.5 (Variegata)
   Enter ".help" for usage hints.
   memory D select a, random() as r from values (1), (2), (3), (4) as t('a') 
group by a having r > 0.5;
   Binder Error:
   Alias "r" referenced - but the expression has side effects. This is not yet 
supported.
   ```


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