foam-framework / foam2

FOAM: Feature-Oriented Active Modeller, Version 2
Apache License 2.0
73 stars 63 forks source link

MDAO behaviour broken on query: AND(*, CONTAINS_IC(ID, *)) #980

Open mdittmer opened 6 years ago

mdittmer commented 6 years ago

@jacksonic says he understands the issue; something to do with ValueIndex not handling predicates.

jacksonic commented 6 years ago

The underlying problem is that ValueIndex.plan() ignores the predicate, unlike other indexes.

In this specific case, we have one ID index, a TreeIndex with ValueIndex tail. The "contains" is handled by the tree, then when it matches nodes and calls subIndex.plan() for each match, the remaining predicates are expected to be respected but are not, as it is calling ValueIndex.plan() and the predicate is ignored.

(In the common case, the TreeIndex drops into select() mode before it hits the ValueIndex leaves, decorating the sink with the remaining predicate.)

mdittmer commented 6 years ago

979 now fixes JS. @kgrgreer can you assign someone to make sure this is fixed in Java?