vesoft-inc / nebula-graph

A distributed, fast open-source graph database featuring horizontal scalability and high availability. This is an archived repo for v2.5 only, from 2.6.0 +, NebulaGraph switched back to https://github.com/vesoft-inc/nebula

Home Page:https://nebula-graph.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`toLower()` does not support in `lookup`

foesa-yang opened this issue · comments

commented

In Nebula Graph version v2.5.0, the following statement is not supported:

(root@nebula) [basketballplayer]> LOOKUP ON player WHERE player.name CONTAINS toLower("L") \
                               ->         YIELD player.name, player.age;
[ERROR (-1009)]: SemanticError: Expression (player.name CONTAINS toLower("L")) not supported yet

But in the previous version, the statement has a return value as follows:

nebula> LOOKUP ON player WHERE player.name CONTAINS toLower("L") \
        YIELD player.name, player.age;
+-------------+---------------------+------------+
| VertexID    | player.name         | player.age |
+-------------+---------------------+------------+
| "player145" | "JaVale McGee"      | 31         |
+-------------+---------------------+------------+
| "player144" | "Shaquille O'Neal"  | 47         |
+-------------+---------------------+------------+
| "player102" | "LaMarcus Aldridge" | 33         |
+-------------+---------------------+------------+

This case has been added in this pr. It's weird if this is not supported in the master branch. Could you verify the version of Nebula service?

show the graph version

commented

I don't agree to support this syntax. This syntax will result in a full index scan. It's a departure from our original design.

commented

If there is such a need, it is best to use full-text index.

There must be something wrong with the developing, testing, and releasing process.
How is this tested and released?

commented

截屏2021-08-20 上午10 42 26
4c4db2306a6c83a66f3167c7e7d55ada

I don't agree to support this syntax. This syntax will result in a full index scan. It's a departure from our original design.

@bright-starry-sky lookup on player also result in a full tag scan. Should we disable these scenarios?

@Sophie-Xie loop PM

@whitewum In the off-line discussion with @bright-starry-sky , he states that this scenario should be processed using full-text search, since this query triggers a full index scan, and will potentially result in a slow query. @bright-starry-sky also talked about this with Sherman, and they had an agreement on this.

So we decide to not support this kind of filter, and I will refactor this PR and submit it to the nebula repo.

@Sophie-Xie is it proper to add to change log in release note?