clickhouse-scala-client
clickhouse-scala-client copied to clipboard
Re-aliasing an aliased column doesnt work
When I want to do the following:
SELECT from_pv as from_start FROM (
SELECT from as from_pv FROM report.pages
)
I would probably do it like this:
val from_pv = Pages.from as "from_pv"
select(from_pv as "from_start").from(
select(from_pv).from(report.pages)
)
but that is currently causing below query:
SELECT from as from_pv as from_start FROM (
SELECT from as from_pv FROM report.pages
)
We should keep track of the aliased columns used in sub selects and then use just the alias in the top level select