diff --git a/src/query/v2/plan/operator.cpp b/src/query/v2/plan/operator.cpp index c908abb59..2ad88cfa9 100644 --- a/src/query/v2/plan/operator.cpp +++ b/src/query/v2/plan/operator.cpp @@ -904,7 +904,6 @@ ScanByPrimaryKey::ScanByPrimaryKey(const std::shared_ptr &input storage::v3::LabelId label, std::vector primary_key, storage::v3::View view) : ScanAll(input, output_symbol, view), label_(label), primary_key_(primary_key) { - // TODO(antaljanosbenjamin): MATCH (p:Permission) WHERE p.uuid <999 RETURN p; MG_ASSERT(primary_key.front()); } diff --git a/src/query/v2/plan/rewrite/index_lookup.hpp b/src/query/v2/plan/rewrite/index_lookup.hpp index 17996d952..0b9b9cb97 100644 --- a/src/query/v2/plan/rewrite/index_lookup.hpp +++ b/src/query/v2/plan/rewrite/index_lookup.hpp @@ -597,6 +597,9 @@ class IndexLookupRewriter final : public HierarchicalLogicalOperatorVisitor { [](const auto &schema_elem) { return schema_elem.property_id; }); for (const auto &property_filter : property_filters) { + if (property_filter.property_filter->type_ != PropertyFilter::Type::EQUAL) { + continue; + } const auto &property_id = db_->NameToProperty(property_filter.property_filter->property_.name); if (std::find(schema_properties.begin(), schema_properties.end(), property_id) != schema_properties.end()) { pk_temp.emplace_back(std::make_pair(property_filter.expression, property_filter));