You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WITH cte AS (SELECT * FROM ....)
(SELECT * FROM cte WHERE ...
UNION
SELECT * FROM cte WHERE ...)
Unfortunately, it seems that when trying to build such a query, the WITH clause is no added to the query. I believe this is due to the first if clause in CTECompiler. generate_sql.
I'm happy to put up a PR to remove the clause and attempt to make it work, but curious if there's a more fundamental not adding the WITH clause to queries with combinations?
The text was updated successfully, but these errors were encountered:
I don't see a test that covers that scenario, and I can't remember if there is a workaround for queries with a combinator. That if clause should have probably raised NotImplementedError rather than returning as_sql(). But maybe that would have caused issues elsewhere?
I would like to write queries of the form:
Unfortunately, it seems that when trying to build such a query, the
WITH
clause is no added to the query. I believe this is due to the first if clause inCTECompiler. generate_sql
.I'm happy to put up a PR to remove the clause and attempt to make it work, but curious if there's a more fundamental not adding the
WITH
clause to queries with combinations?The text was updated successfully, but these errors were encountered: