-
Notifications
You must be signed in to change notification settings - Fork 8
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
Sequel to #860 and #861: Incorrect SQL code generated for I /\ r~;r /\ s;s~ in the face of generalizations #862
Comments
Here is a file issue862 sql code.txt that I just managed to upload. It contains the (erroneous) SQL code, but (alas) also some rubbish around it - please ignore that. |
I managed to produce ADL code that demonstrates this issue, as well as another one that seems to have the same cause:
To reproduce, build a prototype, (re)install the database, and click on the We have two issues:
The problem seems to originate from a combination of optimization code and the fact that generalizations are in play here. |
There is good news and bad news. While looking at the code, I found the bug. Acutally, this bug was introduced while solving issue #217 . Later on, also similar bugs were found (issue #627 and #760). It turns out that the function that decides when an expression can be found in a broad table (and in the same row!) is buggy. It needs to be rewritten. Good news is that this can be done in an elegant manner. Bad news is that this will take some more time. |
This ticket describes the issue we have encountered in a large project, and that we tried to describe earlier in #860 and #861, which were attempts to quickly find a solution. The issue is that in our project we have the following rule (definitions of relations are given in the comments):
Compiling the script with the --sqldump switch resulted in the following SQL as is shown in the file referenced in next comment.
The problem can be seen by focusing on the last lines in the SQL, and in particular the following:
Notice that lines 3 and 4 show the names of relations
npform_Geslachtsnaam
andnpform_Voornamen
, whereas line 2 shows the name of a concept,PolisRegForm
. I would have expected thatPolisRegForm
would have been a SQL text that representspolregNPForm~
(notice the~
here).The text was updated successfully, but these errors were encountered: