prql
prql copied to clipboard
feat: Add union operator
This is still a WIP -- I'm getting a error in semantic which I need to spend some more time on.
Any thoughts on the language design? Currently this has a required positional param to specify the type of the union -- should we do that vs. an optional named param?
I like the language design: in most cases you'd write union all, which is quite self-explanatory. We could use a default value here, but we'd have to convert to a named argument:
from table1
union kind:distinct table2
Regarding the comment about resolving: to be honest I don't remember how to enable table resolving at main branch because I redid that at semantic branch 2 times :D Can this PR wait a week for semnatic to be merged?
Can this PR wait a week for
semanticto be merged?
For sure!
I've tried to convert this to a "good-first-issue", but it included work on many parts of the codebase, so I just did it myself.
It needs docs, though.
This is how it works:
from employees
concat managers
union other_employees
Awesome!! I am happy to do the docs