uwdb / Cosette

Cosette is an automated SQL solver.
BSD 2-Clause "Simplified" License
666 stars 54 forks source link

Self JOINs produce Coq syntax error #17

Closed Snoozy closed 7 years ago

Snoozy commented 7 years ago

With this query,

schema s1(user_id:ty0, parent_id:ty0, ??);

table users(s1);

query q1
`SELECT user.user_id as id
FROM users u
JOIN users AS p
  ON p.user_id = u.parent_id
WHERE u.user_id = u.user_id`;

query q2
`SELECT user.user_id as id
FROM users u
JOIN users AS p
  ON p.user_id = u.parent_id
WHERE u.user_id = u.user_id`;

verify q1 q2;

Cosette returns a syntax error pointing to users on the line of the the JOIN.

stechu commented 7 years ago

subsided by #20