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
Still working on a query builder to convert transformation steps into SQL via PRQL
We have an issue with append that doesn't seem to work well with basic tables
I'm more than happy to help on debugging this
PRQL input
from `albums`select {`album_id`,`title`}sort {+`album_id`}take 2append (
from `albums`
select {`album_id`,`title`}
sort {-`album_id`} take 2)
SQL output
fails
Expected SQL output
WITH table_0 AS (
SELECT
album_id,
title
FROM
albums
ORDER BY
album_id DESCLIMIT2
)
SELECT*FROM
(
SELECT
album_id,
title
FROM
albums
ORDER BY
album_id
LIMIT2
) AS table_1
UNION
ALL
SELECT*FROM
table_0
MVCE confirmation
Minimal example
New issue
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Interesting serendipity (of timing). Just this morning, I was looking at this and #5055 which has a similar pattern. Rewriting the original query as follows works as expected in the current Playground.
I wonder if the fix from @lukapeshke will address #5055 as well...
# ==== from #4947 - rewritten
let a = (
from `albums`
select { `album_id`, `title` }
sort {+`album_id`}
take 2
)
let b = (
from `albums`
select { `album_id`, `title` }
sort {-`album_id`}
take 2
)
from a
append b
What happened?
Still working on a query builder to convert transformation steps into SQL via PRQL
We have an issue with
append
that doesn't seem to work well with basic tablesI'm more than happy to help on debugging this
PRQL input
SQL output
Expected SQL output
MVCE confirmation
Anything else?
No response
The text was updated successfully, but these errors were encountered: