Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How are strings compared in redisgraph? #3189

Open
zhangliang-zl opened this issue Sep 18, 2023 · 4 comments
Open

How are strings compared in redisgraph? #3189

zhangliang-zl opened this issue Sep 18, 2023 · 4 comments

Comments

@zhangliang-zl
Copy link

My test case is as follows. When using entity attributes for comparison, it does not work properly

GRAPH.QUERY "asset" "MATCH  (n2 :NetworkSegment)  WHERE n2.ipRangeStart <= '000000000000000000000000000001684277521'  RETURN  count(n)" 
1) 1) "count(n2)"
2) 1) 1) "0"

GRAPH.QUERY "asset" "MATCH  (n2 :NetworkSegment)  WHERE '000000000000000000000000000003658716353' <= '000000000000000000000000000001684277521'  RETURN  n2.ipRangeStart" 
 "n2.ipRangeStart"

2) 1) 1) "000000000000000000000000000001684277770"
   2) 1) "000000000000000000000000000001684277761"
   3) 1) "000000000000000000000000000000016843027"
   4) 1) "000000000000000000000000000003232235777"
   5) 1) "000000000000000000000000000001684276800"
   6) 1) "000000000000000000000000000001684277258"
   7) 1) "000000000000000000000000000001684277523"
   8) 1) "000000000000000000000000000001684277760"
   9) 1) "000000000000000000000000000000151126795"
   10) 1) "000000000000000000000000000000151126805"
   11) 1) "000000000000000000000000000000923010159"
   12) 1) "000000000000000000000000000000016843009"
   13) 1) "000000000000000000000000000001684276068"
   14) 1) "000000000000000000000000000001684276481"
   15) 1) "000000000000000000000000000001684276800"
   16) 1) "000000000000000000000000000001684276993"
   17) 1) "000000000000000000000000000001684277256"
   18) 1) "000000000000000000000000000001684277258"
   19) 1) "000000000000000000000000000001684277313"
   20) 1) "000000000000000000000000000001684277312"
   21) 1) "000000000000000000000000000001684277523"
   22) 1) "000000000000000000000000000001684277768"
   23) 1) "000000000000000000000000000001684277761"
   24) 1) "000000000000000000000000000001684277760"
   25) 1) "000000000000000000000000000001684277761"
   26) 1) "000000000000000000000000000001684277770"
   27) 1) "000000000000000000000000000000016843009"
   28) 1) "000000000000000000000000000000791621423"
   29) 1) "000000000000000000000000000000175077917"
   30) 1) "000000000000000000000000000000173812096"
   31) 1) "000000000000000000000000000001902708481"
   32) 1) "000000000000000000000000000002000564224"
   33) 1) "000000000000000000000000000003074423393"
   34) 1) "000000000000000000000000000003683091104"
   35) 1) "000000000000000000000000000003735870976"
   36) 1) "000000000000000000000000000000992558608"
   37) 1) "000000000000000000000000000000175073934"
   38) 1) "000000000000000000000000000000167772160"
   39) 1) "000000000000000000000000000000992653562"
   40) 1) "000000000000000000000000000000989546753"
   41) 1) "000000000000000000000000000000989397729"
   42) 1) "000000000000000000000000000000989338112"
   43) 1) "000000000000000000000000000000989336648"
   44) 1) "047896470883454335353216816918185377792"
   45) 1) "000000000000000000000000000003708277760"
   46) 1) "000000000000000000000000000003721753184"
   47) 1) "000000000000000000000000000003701696256"
   48) 1) "000000000000000000000000000003683231496"
   49) 1) "000000000000000000000000000003683191616"
   50) 1) "000000000000000000000000000003683091106"
   51) 1) "000000000000000000000000000003658716353"
   52) 1) "000000000000000000000000000003524613825"
   53) 1) "000000000000000000000000000003395849985"
   54) 1) "000000000000000000000000000003395609956"
   55) 1) "000000000000000000000000000003232235520"
   56) 1) "000000000000000000000000000003070657490"
   57) 1) "000000000000000000000000000002566952001"
   58) 1) "000000000000000000000000000002096352513"
   59) 1) "000000000000000000000000000002030610688"
   60) 1) "000000000000000000000000000002032147296"
   61) 1) "000000000000000000000000000002031059426"
   62) 1) "000000000000000000000000000002028782017"
   63) 1) "000000000000000000000000000002028780164"
   64) 1) "000000000000000000000000000002028770361"
   65) 1) "000000000000000000000000000002028770331"
   66) 1) "000000000000000000000000000002000564225"
   67) 1) "000000000000000000000000000001962681984"
   68) 1) "000000000000000000000000000001902952178"
   69) 1) "000000000000000000000000000001902710112"
   70) 1) "000000000000000000000000000001902710178"
   71) 1) "000000000000000000000000000001866146752"
   72) 1) "000000000000000000000000000000173817600"
   73) 1) "000000000000000000000000000000173816832"
   74) 1) "000000000000000000000000000000175342976"
   75) 1) "000000000000000000000000000000175068892"
   76) 1) "000000000000000000000000000000175078347"
   77) 1) "000000000000000000000000000000175077898"
   78) 1) "000000000000000000000000000003524613824"
   79) 1) "000000000000000000000000000001032860000"
   80) 1) "000000000000000000000000000002566951937"
   81) 1) "000000000000000000000000000001780964865"
   82) 1) "000000000000000000000000000000175074020"
   83) 1) "000000000000000000000000000000175069185"
   84) 1) "000000000000000000000000000000173817344"
   85) 1) "000000000000000000000000000000175052241"
   86) 1) "000000000000000000000000000001866146752"
   87) 1) "000000000000000000000000000001962681984"
   88) 1) "000000000000000000000000000002030610688"
   89) 1) "000000000000000000000000000002028647905"
   90) 1) "000000000000000000000000000002028780164"
   91) 1) "000000000000000000000000000002030987009"
   92) 1) "000000000000000000000000000002032147296"
   93) 1) "000000000000000000000000000002886729728"
   94) 1) "000000000000000000000000000003395609602"
   95) 1) "000000000000000000000000000003395636481"
   96) 1) "000000000000000000000000000000974184449"
   97) 1) "000000000000000000000000000003524614272"
   98) 1) "000000000000000000000000000003683191552"
   99) 1) "000000000000000000000000000003683238646"
   100) 1) "000000000000000000000000000003701696256"
   101) 1) "000000000000000000000000000003708277760"
   102) 1) "000000000000000000000000000000989397729"
   103) 1) "000000000000000000000000000000989404385"
   104) 1) "000000000000000000000000000002028770387"
   105) 1) "000000000000000000000000000001902710202"
   106) 1) "000000000000000000000000000002028770360"
   107) 1) "000000000000000000000000000003683191618"
   108) 1) "000000000000000000000000000000989337968"
   109) 1) "000000000000000000000000000002095316224"
@zhangliang-zl
Copy link
Author

zhangliang-zl commented Sep 18, 2023

shell The WHERE toString (n2. ipRangeStart)<='0000000000000000001684277521'

writing method can be used normally.

Excuse me, is this necessary? Can String comparisons use indexes?

@AviAvni
Copy link
Collaborator

AviAvni commented Sep 19, 2023

which version you are using?
I'm not able to reproduce this
can you provide a reproduction steps?

@zhangliang-zl
Copy link
Author

Modules

module:name=graph,ver=20821,api=1,filters=0,usedby=[],using=[],options=[]

I constructed 10 pieces of data and the problem has not been reproduced yet. It may not reappear until the data reaches a certain level.

@AviAvni
Copy link
Collaborator

AviAvni commented Sep 21, 2023

can you try help reproduce this please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants