You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
I've found a pretty specific bug. For a query like or(col.match, col.match...).orderBy(col), if col is indexed, then the ordering of the results are defined by the ordering of or's arguments instead of orderBy.
Thanks for the report. I can reproduce this. The example has a small error (num is stored as a number because parseInt(i,10) is called (it should be i.toString() instead), but I can still reproduce without it.
The results are sorted correctly using the available index, up until the select(combined_pred_or) step is executed which discards the sort order up to that point and uses the order in which the OR terms appear in the query. I am still thinking about the proper fix. My initial thinking is that the OrderByIndexPass should be updated to not modify the tree when an OR predicate exists, because the tree after modification is not equivalent to the original tree.
I've found a pretty specific bug. For a query like
or(col.match, col.match...).orderBy(col)
, if col is indexed, then the ordering of the results are defined by the ordering of or's arguments instead of orderBy.Here's an example: https://jsfiddle.net/qnfywync/1/ (code also at https://gist.github.com/simon-weber/e9ac8147b5daaf1ca08fdae0ec55cad2). I've marked the spots that are interesting to change with a
-->
.Superficially, this looks similar to #118 -- maybe the issue is also with MultiColumnOrPass?
The text was updated successfully, but these errors were encountered: