-
Notifications
You must be signed in to change notification settings - Fork 43
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
Regexes in nested queries do not work #754
Labels
Comments
In the short term, I will unblock myself by implementing #538 as I'm not too familiar with the intricacies of the normalisation algorithm. |
This is a little surprising to me, since the query itself is flat, we should take a look. It may be a shallow problem, perhaps just due to not doing the regex translation when shredding is enabled. |
Merged
jamescheney
added a commit
that referenced
this issue
Jun 22, 2020
frank-emrich
pushed a commit
to frank-emrich/links
that referenced
this issue
Sep 16, 2020
* fix 754 by passing regular expressions through let insertion and flattening stages * whitespace * whitespace * add genuinely nested query test
SimonJF
added a commit
that referenced
this issue
Nov 19, 2020
…xpressions (#935) # Issue (Related in part to #754). Previously, compiled regular expressions failed at runtime. As an example from GtoPdb: ``` for (strI <-- Tables.structural_info) where (strI.object_id == objectId && strI.species_id == 2) for (al <-- Tables.allele) where (strI.official_gene_id <> "" && al.accessions =~ /.*{strI.official_gene_id}.*/) ``` would fail due to the clause ``` al.accessions =~ /.*{strI.official_gene_id}.*/ ``` within the `where` clause, since we're including a regular expression which projects from the `strI` table. # Scope This patch rectifies the above problem for `LIKE`-translatable queries (but not yet for arbitrary `RLIKE` queries). # Proposal To fix this, we need to do two things: generalise the return type of `likeify` to return a `base` expression which then allows strings, concatenation, and projection operators; and ensure the nested query translations occur inside regular expressions. The patch also ensures that concatenation is translated correctly by the MySQL database driver.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looking at the dictionary suggestion example, (
examples/dictionary/dictSuggest.links
), we can use regex syntax to translate to SQLLIKE
predicates. However, this is unsupported when using nested queries.MFE:
yields
The text was updated successfully, but these errors were encountered: