Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

toLower() does not support in lookup #1335

Closed
foesa-yang opened this issue Aug 19, 2021 · 10 comments
Closed

toLower() does not support in lookup #1335

foesa-yang opened this issue Aug 19, 2021 · 10 comments
Labels
bug Type: something is unexpected incompatible PR: incompatible with the master branches in the storage or common repos

Comments

@foesa-yang
Copy link

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         |
+-------------+---------------------+------------+
@Aiee
Copy link
Contributor

Aiee commented Aug 19, 2021

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?

@whitewum
Copy link
Contributor

show the graph version

@bright-starry-sky
Copy link
Contributor

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
Copy link
Contributor

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

@whitewum
Copy link
Contributor

whitewum commented Aug 20, 2021

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

@foesa-yang
Copy link
Author

foesa-yang commented Aug 20, 2021

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

@whitewum whitewum added the bug Type: something is unexpected label Aug 20, 2021
@czpmango
Copy link
Contributor

czpmango commented Aug 23, 2021

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?

@whitewum
Copy link
Contributor

@Sophie-Xie loop PM

@Aiee
Copy link
Contributor

Aiee commented Aug 23, 2021

@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.

@whitewum whitewum added the incompatible PR: incompatible with the master branches in the storage or common repos label Aug 23, 2021
@whitewum
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Type: something is unexpected incompatible PR: incompatible with the master branches in the storage or common repos
Projects
None yet
Development

No branches or pull requests

5 participants