-
Notifications
You must be signed in to change notification settings - Fork 872
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
Incorrect work of 'SELECT' query #7322
Comments
hi @schernolyas, which API did you use for do the transaction ? this look quite strange, a snippet of code of example may help to solve the problem. Regards |
oh... do you have an index on ID property? Probably it's a bug in the execution planner. Could you please post the result of an EXPLAIN? Thanks Luigi |
Hi @luigidellaquila ! Yes of course! field 'id' is primary key (field with unique index). In current case, field's type is String. About explain ... okey I recall query |
@luigidellaquila , please, see to explain. explain document :
query:
|
Thank you very much @schernolyas Ok, the execution plan is correct, the problem is somewhere else. Thanks Luigi |
Hi @luigidellaquila ! Make OrientDB better :) |
hi, fixed and added the test case Thanks for the report and the early testing, really appreciate. Regards |
Great @tglman ! |
Hi @tglman and @luigidellaquila ! A lot of thanks! I pull last changes and recheck! |
Sorry collegues! Not fixed. I pull last commits: osboxes@osboxes:~/NetBeansProjects/orientdb$ git log -n 3
commit 6255c91
commit 47740ef
[main] 18:43:22,038 DEBUG org.hibernate.ogm.datastore.orientdb.dialect.impl.OrientDBEntityQueries: explain document :{"@type":"d","@Version":0,"executionPlan":{"@type":"d","@Version":0,"cost":0,"prettyPrint":"+ FETCH FROM INDEX ProductTypePK\u000a id = '3dc1fabf-540e-43c6-a1ce-fc1b45a46e72'\u000a+ EXTRACT VALUE FROM INDEX ENTRY\u000a+ FILTER ITEMS BY CLASS \u000a ProductType","type":"QueryExecutionPlan","steps":[{"@type":"d","@Version":0,"cost":0,"subSteps":[],"name":"FetchFromIndexStep","description":"+ FETCH FROM INDEX ProductTypePK\u000a id = '3dc1fabf-540e-43c6-a1ce-fc1b45a46e72'","type":"FetchFromIndexStep","targetNode":"FetchFromIndexStep","javaType":"com.orientechnologies.orient.core.sql.executor.FetchFromIndexStep","@fieldTypes":"cost=l"},{"@type":"d","@Version":0,"cost":-1,"subSteps":[],"name":"GetValueFromIndexEntryStep","description":"+ EXTRACT VALUE FROM INDEX ENTRY","type":"GetValueFromIndexEntryStep","targetNode":"GetValueFromIndexEntryStep","javaType":"com.orientechnologies.orient.core.sql.executor.GetValueFromIndexEntryStep","@fieldTypes":"cost=l"},{"@type":"d","@Version":0,"cost":-1,"subSteps":[],"name":"FilterByClassStep","description":"+ FILTER ITEMS BY CLASS \u000a ProductType","type":"FilterByClassStep","targetNode":"FilterByClassStep","javaType":"com.orientechnologies.orient.core.sql.executor.FilterByClassStep","@fieldTypes":"cost=l"}],"javaType":"com.orientechnologies.orient.core.sql.executor.OSelectExecutionPlan","@fieldTypes":"cost=l,steps=z"},"executionPlanAsString":"+ FETCH FROM INDEX ProductTypePK\u000a id = '3dc1fabf-540e-43c6-a1ce-fc1b45a46e72'\u000a+ EXTRACT VALUE FROM INDEX ENTRY\u000a+ FILTER ITEMS BY CLASS \u000a ProductType"} |
Hi @luigidellaquila ! |
Hi @schernolyas I just pushed another fix on develop branch, it should cover all the cases. Thanks Luigi |
HI @luigidellaquila ! |
Hi @luigidellaquila ! |
Hi @schernolyas Is the new exception still related to this specific problem? Can I close this issue? Thanks Luigi |
@luigidellaquila ORecordDuplicatedException: Cannot index record #35:0: found duplicated key '1' in index 'BuyingOrderPK' previously assigned to the record #33:0 But ... Why? .... Get me a time for analysis... Full stack trace in attached file. org.hibernate.ogm.datastore.orientdb.test.jpa.OrientDbAssociationTest-output.txt |
Hi @luigidellaquila ! I have investigaed exception from my last message. It it my exception. A lot of thanks for support! |
Thanks for the feedback @schernolyas ! Luigi |
OrientDB Version: 3.0.0-SNAPSHOT
Java Version: 1.8
OS: Ubuntu
Try to execute query "SELECT FROM ProductType WHERE id="74326f5e-ca9f-4e29-9e2c-a87da69e6f90""
Expected behavior
returns no documents.
Actual behavior
Returns: {"@type":"d","@Rid":"#25:-5","@Version":0,"@Class":"ProductType","description":"vegetables","id":"99246056-882f-4ba4-8d3d-44543e8bc7ef"}
Steps to reproduce
During transactions add document and try to search the document.
The text was updated successfully, but these errors were encountered: