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.75k stars 1.2k forks source link

Handling ambiguities in the bison glr parser #5235

Closed czpmango closed 1 year ago

czpmango commented 1 year ago

Describe the bug An ambiguity from bison glr parser occurred when parsing some statements.

Your Environment nebula 3.3.0

How To Reproduce

(root@nebula) [nba]> MATCH (v:player{name: 'Tim Duncan'})-[e:like*0..2]-(v2) WHERE size([ii in e WHERE (v)-[ii]-(v2) | ii])>1  RETURN count(*) AS cnt 
[ERROR (-1004)]: SyntaxError: syntax is ambiguous near `(v)-[ii]-(v2)'

Expected behavior Parse out the correct AST.

czpmango commented 1 year ago

Already fixed.