slamdata / purescript-sql-squared

purescript Sql^2 ast, pretty printer etc
11 stars 6 forks source link

[qz-3635] Correct precedence when parsing join conditions #43

Closed wemrysi closed 6 years ago

wemrysi commented 6 years ago

Corrects the parsing of join conditions so that queries like

select * from a inner join b on a.id = b.id limit 10

parse correctly. Prior to this fix the limit would be considered part of the join condition and not the outer query.

garyb commented 6 years ago

@wemrysi this looks good to me - I assume the change is to match the way it parses in Quasar?

wemrysi commented 6 years ago

@garyb Yeah, both were wrong and the Quasar parser was fixed in quasar-analytics/quasar#3452 so this is just applying the same fix here.