Conversation
ClickHouse supports two different sorts of CTEs: 1. Normal, subquery based CTEs supported by most DBMS 2. Expression-based CTEs This PR adds support for (2) by adding a new adapter-specific method. Note the SQL syntax is flipped for (2).
286bbdc to
f82412a
Compare
|
👋 @macobo If it's time-sensitive, I am happy to merge it but maybe as undocumented function/macro to avoid anyone outside of Plausible using it until we verify there is no other way to support this type of CTEs. |
|
Not in a rush right now - I thought this might simplify a task I'm working on, but I might be taking another approach. |
|
Small note for if you do end up reaching out to ecto developers: Keeping And the adapter can take care of the rest |
|
Definitely! But I don't think this alone would be enough for this example to work, since Ecto would try to ensure that |
ClickHouse supports two different sorts of CTEs:
This PR adds support for (2) by adding a new adapter-specific method. Note the SQL syntax is flipped for (2).
Implementation is a hack - let me know if there are better solutions!