ScanAllByLabelPropertyRange
does not work with <
and >
operators
#1954
Labels
bug
bug
Effort - Low
Effort - Low
Frequency - Daily
Frequency - Daily
Priority - Later
Priority - Later
Reach - Some
Reach - Some
Severity - S2
Severity - S2
Milestone
Memgraph version
v2.16
Environment
Docker
Describe the bug
Although
ScanAllByLabelPropertyRange
operator is used in the query, it does not capture both lower and upper bound of the query.To Reproduce
Steps to reproduce the behavior:
Expected behavior
ScanAllByLabelPropertyRange
operator should be applied with much smaller amount of rows.Details
The details are in the
index_lookup.hpp
andpreprocess.cpp
void Filters::AnalyzeAndStoreFilter(Expression *expr, const SymbolTable &symbol_table)
function does not have the capability of generating aPropertyFilter
ofType::Range
, and that's why only upper or lower bound is written inside a property filter.In the
index_lookup.hpp
, that filter is consumed and aScanAllByLabelPropertyRange
is applied, but with the maximal upper or lower bound, because we have applied only one filter to form an index. Furthermore, the second filter operation will be left out and virtual calls will be spent on unnecessary verification.Possible solutions:
SplitExpressionOnAnd
is splitting those filters, but a post filter rewriter can do the jobThe text was updated successfully, but these errors were encountered: