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

Query Parsing and Analysis #396

Open
domoritz opened this issue May 23, 2024 · 3 comments
Open

Query Parsing and Analysis #396

domoritz opened this issue May 23, 2024 · 3 comments
Labels
projects Project ideas for Mosaic

Comments

@domoritz
Copy link
Member

Currently query analysis is only possible when using Mosaic’s SQL builder methods, which maintain a structured representation of the query. While arbitrary query expressions are allowed, they are not analyzed. This project would develop a SQL parser in JavaScript that we can use to parse SQL text into a structured representation such as an AST. DuckDB already has a parser in the JSON extension.

@domoritz domoritz added the projects Project ideas for Mosaic label May 23, 2024
@domoritz
Copy link
Member Author

domoritz commented Sep 1, 2024

This could be super useful for #510 but we probably want to consider revising the SQL representation in mosaic first.

@nicosuave
Copy link

Depending on how wide you're looking to go with multi database support beyond the DuckDB multi database support for Postgres/MySQL, could use something like this. Seems like lots of dialects are implemented; I'm sure DuckDB isn't too far from Postgres. Not too sure of quality, but seems reasonable?

@domoritz
Copy link
Member Author

Thanks for the link. I think we can make our lives a bit easier by generating SQL in different dialects from a structured format (which we already have in https://github.com/uwdata/mosaic/tree/main/packages/sql). But we need to make the current implementation more flexible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
projects Project ideas for Mosaic
Projects
None yet
Development

No branches or pull requests

2 participants