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

The match statement starting with a colon (:) in a multi-tag scenario results in a parsing error. #5605

Open
gavin-ao opened this issue Jun 20, 2023 · 0 comments
Labels
affects/none PR/issue: this bug affects none version. severity/none Severity of bug type/bug Type: something is unexpected

Comments

@gavin-ao
Copy link

Please check the FAQ documentation before raising an issue

Describe the bug (required)

Your Environments (required)

  • OS: uname -a
  • Compiler: g++ --version or clang++ --version
  • CPU: lscpu
  • Commit id (e.g. a3ffc7d8)

How To Reproduce(required)

Steps to reproduce the behavior:

match (v:
frame_common{
project_id : "项目1111"
}
:
frame_feature{
prop_1 : "土建"
,
prop_2 :"主体结构"
}
) return v limit 100

Expected behavior

如上面的match语句,假如:出现在一行的开头,语句会解析错误。
当用ngbatis构造ngql语句的时候,难以完全避免让:出现在行的开头。
目前我们是这么规避的:

<select id="getVertexByProperties" resultType="com.vesoft.nebula.client.graph.data.ResultSet">
    match (v:
    @for(tagentry in tagpropertiesmap) {
        ${ tagentry.key }{
            @for(itementry in tagentry.value) {
                ${itementry.key} : "${itementry.value}"
                @if ( !itementryLP.last ) {
                    ,
                @}
            @}
            @if ( !tagentryLP.last) {
                } :
            @}
            @if ( tagentryLP.last) {
                }
            @}
    @}
    ) return v limit 100

通过加入两个if标签,避免让:出现在行首

Additional context

@gavin-ao gavin-ao added the type/bug Type: something is unexpected label Jun 20, 2023
@github-actions github-actions bot added affects/none PR/issue: this bug affects none version. severity/none Severity of bug labels Jun 20, 2023
@QingZ11 QingZ11 changed the title 多tag下的match匹配语句,以:开头语句解析错误 The match statement starting with a colon (:) in a multi-tag scenario results in a parsing error. Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/none PR/issue: this bug affects none version. severity/none Severity of bug type/bug Type: something is unexpected
Projects
None yet
Development

No branches or pull requests

1 participant