-
Notifications
You must be signed in to change notification settings - Fork 26
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
Error running PRQL query with REGEXP #50
Comments
On my qStudio this compiles but then sqlite fails as it doesn't support REGEXP: Can you try pasting the PRQL into your specific prqlc that you use for qStudio? |
Good troubleshooting tip. I'll let you know how it turns out. |
Here's the output from
Thanks for all this good work!
|
Ahah! I know more now... The query is gagging on the REGEXP call. SQLite doesn't bundle the REGEXP facility by default. The docs at https://www.sqlite.org/lang_expr.html explain:
https://stackoverflow.com/questions/5071601/how-do-i-use-regex-in-a-sqlite-query gives many hints. Also check out https://github.com/nalgeon/sqlean/tree/main |
That's frustrating. It seems either:
Either way I'm not sure there's much qStudio should do.
|
Frustrating, indeed. Another thought (although I confess that I don't really understand all the layers of this...) Googling "sqlite jdbc regexp" brings up this StackOverflow article: https://stackoverflow.com/a/28587200/1827982 Does this give you any useful info? Many thanks... |
Oh I kind of see how it could be done, I'm just super reluctant to start owning that code. |
Would that make your life straightforward? (I totally understand not owning all kinds of code...) Is raising an issue over there something you could do? Thanks. |
Raised in both places that I think it could or should be fixed. Closing here. |
Workaround: It's not perfect, but for many situations, all you need is a LIKE %string% feature. Here's an implementation of
Changing all the It would still be terrific to bundle in a SQLite version that supports REGEXP... |
Workaround found: #50 (comment)
Using qStudio 3.03 on macOS 12.7.5 with Java 16.0.1. I can open the Property in Lyme.sqlite database and use short PRQL queries. For example this query returns six substantially identical rows with different dates:
But if I try to execute a longer query (for example, Non-conf_Buildings.prql) I get the following error.
I will note that all three PRQL reference implementations (PRQL Playground 0.11.3, PRQL VSCode extension 0.11.3, and PRQL DevContainer 0.11.5) do not give this error and generate identical SQL code for this query.
This might be a
prqlc
problem - but I'm reporting it here. What other information could I provide? Thanks.The text was updated successfully, but these errors were encountered: