ObjectDB ObjectDB

URGENCY, or in query does not report any objects on first operand having no results

#1

this query does not return any objects even there are lot of objects to return for the second operand:

select a from Action a where (a.state = 2 or a.state = 3) and a.type = 0 and a.transferred = 0

if the query is changed to

select a from Action a where (a.state = 3 or a.state = 2) and a.type = 0 and a.transferred = 0

there are all the results for the condition a.state = 3

it seems that the or is not working at all

the query plan is:

Query plan 1/2 description
============================

[Step 1]
Scan index com.agile.hummingbird.Action[state, subType, type, startDate, endDate, detail, transferred]
locating Action (a) instances that satisfy: 
  and(and(or((a.state=3),(a.state=2)),(a.type=0)),(a.transferred=0)).

[Step 2]
Apply selection and prepare final results.


<btreePlan 15.7575 4,74/6,50 a(Action) index(-161:sstsedt[and(and(or([3->3:notNull],(a.state=2)),[pos<2>0->0:notNull]),[pos<6>0->0:notNull])]) />
 

 

 

edit
delete
#2

Does the issue happen also with other versions: 2.7.6, 2.8.9? (issue #2853 that seems relevant was fixed in build 2.8.9). Can you share a sample database that demonstrates the issue?

ObjectDB Support
edit
delete
#3

it does not happen with 2.7 (it was working for years) 2.8.9 not checked, we are currently downloading the DB and will share it in some minutes

edit
delete
#4

https://www.dropbox.com/scl/fi/opmxtk8n63og3mrok5bhh/coreSystemDb.rar?rlkey=y2dd9j8bjqnnpx724b6gv39ng&dl=0

edit
delete
#5

Checked with 2.8.9 and both queries return 1421 results, so hopefully this issue is issue #2853 that has already been fixed.

ObjectDB Support
edit
delete
#6

it works with 2.8.9, thanks

edit
delete

Reply

To post on this website please sign in.