vesoft-inc / nebula

A distributed, fast open-source graph database featuring horizontal scalability and high availability
https://nebula-graph.io
Apache License 2.0
10.83k stars 1.2k forks source link

Optimize filter pushdown and fix the bug in TCK tests. #5938

Closed Xscaperrr closed 1 month ago

Xscaperrr commented 2 months ago

What type of PR is this?

What problem(s) does this PR solve?

Issue(s) number:

Description:

https://discuss.nebula-graph.com.cn/t/topic/15979 进行全量索引扫描时,无法将条件下推至底层IndexScan算子,而利用索引进行前缀搜索时可以。 When performing a full index scan, it is not possible to push down the conditions to the underlying IndexScan operator, whereas it is possible when using the index for prefix searches.

How do you solve it?

修改OptimizerUtils.h中的函数,使其在未找到最佳索引时,仍然会接受filter并写入IndexQueryContext中。 此修改仅能让以and连接的条件下推。 修改MatchSolver.cpp,使其能同样识别OR类型表达式。

在tck测试中,对于未经过转换的字典对象,不再将其key放入keylist,因为该情况后续未使用keylist 直接通过keylist是否为空判断字典是否不存在嵌套

Special notes for your reviewer, ex. impact of this fix, design document, etc:

Checklist:

Tests:

Affects:

Release notes:

Please confirm whether to be reflected in release notes and how to describe:

ex. Fixed the bug .....

CLAassistant commented 2 months ago

CLA assistant check
All committers have signed the CLA.

Salieri-004 commented 2 months ago

LGTM. Thanks for your help~