4 ms·
As said, currently PRQL transpiles to SQL, so all expressions in PRQL are can be expressed in SQL. But not all SQL expression can be translated back into PRQL -
by aerzen 4y ago
As said, currently PRQL transpiles to SQL, so all expressions in PRQL are can be expressed in SQL. But not all SQL expression can be translated back into PRQL - some intentionally and some are just not yet implemented (UNION - i.e. vertical concat).
But we also have plans for doing things that some SQL databases may not support, such as pivot (rows to columns).
- coremoff 4y agohopefully you'll forgive my pedantry - "union all" is vertical concat - "union" without the "all" gives you the distinct list
- jhgb 4y agoOne of the reasons why SQL is crap: there should be no distinction between the two in relational algebra. A set of {A, B, C, B, C} is the same as {A, B, C}.
- ttfkam 4y agoDetecting duplicates has a cost you can't just hand-wave away. UNION ALL tells the engine not to worry about it and just output as it sees it, usually going faster. Depends on your data needs.
- jhgb 4y agoAnd not treating relationships as sets has costs of its own -- for example it breaks relational formula equivalences that could be used for query optimization.
- intelijstupide 4y ago
- SnowHill9902 4y agoFor some definitions of same as.