Strange behaviour in optimize function #3208
Replies: 1 comment 1 reply
-
This seems like a bug, can you please file an issue to track it properly? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello guys, I have been using the optimizer function, and I think I have found a strange behaviour which is causing the optimize function to output an invalid query.
Whilst I found this isse on a trickier query, I have tried to create a simple example which illustrates the issue for reproducibility. Here it is:
When I call optimize on this as follows:
I get this:
However this is not valid sql - the CTE which is being referenced in the optimized query -
cte2
- is no longer defined, and the join relation has also been completely lost.Is this an issue, or am I doing something wrong here?
Thanks guys!
Beta Was this translation helpful? Give feedback.
All reactions