Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support parsing join tables statements in parentheses #3254

Closed
jennifersp opened this issue Apr 19, 2022 · 0 comments · Fixed by dolthub/go-mysql-server#971
Closed

support parsing join tables statements in parentheses #3254

jennifersp opened this issue Apr 19, 2022 · 0 comments · Fixed by dolthub/go-mysql-server#971
Assignees
Labels
dumps Deals with dumping to and from mysql

Comments

@jennifersp
Copy link
Contributor

Dolt gives unsupported syntax error for this query for having extra parentheses on join statements generated from mysqldump

CREATE VIEW sales_by_film_category AS 
select c.name AS category,
sum(p.amount) AS total_sales 
from (((((payment p 
	join rental r on((p.rental_id = r.rental_id))) 
	join inventory i on((r.inventory_id = i.inventory_id))) 
	join film f on((i.film_id = f.film_id))) 
	join film_category fc on((f.film_id = fc.film_id))) 
	join category c on((fc.category_id = c.category_id))) 
group by c.name order by total_sales desc;

without join statements in parentheses, query works fine

CREATE VIEW sales_by_film_category AS 
select c.name AS category,
sum(p.amount) AS total_sales 
from payment p 
	join rental r onp.rental_id = r.rental_id
	join inventory i on r.inventory_id = i.inventory_id
	join film f on i.film_id = f.film_id
	join film_category fc on f.film_id = fc.film_id
	join category c on fc.category_id = c.category_id
group by c.name order by total_sales desc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dumps Deals with dumping to and from mysql
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant