Re:Show HN: PRQL 0.2 – a better SQL
by throwaway236324 on Tuesday June 28, 2022 @04:43AM
(#31905542)
Have you considered using "optional"? I feel that this would be a more natural syntax for joins. It could default to "left join", which is probably more frequently used than a right join.
from employees join optional positions [id==employee_id] --> LEFT JOIN
from employees join positions [id==employee_id] --> JOIN
Then you'd use "optional right" or something similar for the "right join" case
That is an interesting suggestion.
Thank you!
Re:Show HN: PRQL 0.2 – a better SQL
by psychoslave on Tuesday June 28, 2022 @04:30AM
(#31905474)
I didn’t mean to make a joke here, what was the funny part? Reading it again,
maybe the tie:arm/leg sounded too much of a BDSM stuff?
Not my initial idea though: I was just looking at short words that might hold the analogy need, from "relationship" you easily come to "tie", and then "arm/leg" for "anterior/posterior" seems pretty straight forward and analogous to "antecedent/(consequent|postcedent|succedent)".
Re:Show HN: PRQL 0.2 – a better SQL
by psychoslave on Tuesday June 28, 2022 @05:28AM
(#31905796)
I transformed this informal suggestion into an issue, see https://github.com/prql/prql/issues/718
This part of the join operation should be an after thought - just a flag after the central argument of the transform which should be the condition you join over.