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

union 4~6 shortestPath match graphd connect error #5994

Open
zougn opened this issue Jan 8, 2025 · 0 comments
Open

union 4~6 shortestPath match graphd connect error #5994

zougn opened this issue Jan 8, 2025 · 0 comments
Labels
affects/none PR/issue: this bug affects none version. severity/none Severity of bug type/bug Type: something is unexpected

Comments

@zougn
Copy link

zougn commented Jan 8, 2025

**Describe the bug (required) **

执行 union 4~6条 包含使用shortestPath 的match查询 导致 graphd 连接异常
发现时机 在编写查询tag集合的点的关联查询时, 在查第二跳时发现 因为要将途径点线看作一条线,所以产生出这种写法
原始查询语句
with ["player","team"] as tgs
match p=shortestPath((a:player{id:11})-[..]-(b:player))
where none( nd in nodes(p)[1..nodes(p).size -1] where any( tg in tgs where tg in lables(nd ) ) )
RETURN b
UNION
with ["player","team"] as tg
match p=shortestPath((a:player{id:11})-[
..]-(b:team))
where none( nd in nodes(p)[1..nodes(p).size -1] where any( tg in tgs where tg in lables(nd ) ) )
RETURN b

Your Environments (required)

  • OS: Linux 192.168.109.136 5.4.278-1.el7.elrepo.x86_64 Parser framework #1 SMP Sun Jun 16 15:37:11 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux
  • environment: docker compose
  • CPU: Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz 2.90 GHz
  • Commit id 4f106fb

How To Reproduce(required)

Steps to reproduce the behavior:

  1. 创建结构
    CREATE SPACE IF NOT EXISTS my_space_1 (vid_type=INT);
    CREATE TAG player(id int,name string, age int);
    CREATE TAG INDEX IF NOT EXISTS player_index_0 on player(id);
    REBUILD TAG INDEX player_index_0;
    CREATE EDGE follow(degree int);
  2. 插入数据
    INSERT VERTEX player (id,name, age) VALUES 11:(11,"n1", 12);
    INSERT VERTEX player (id,name, age) VALUES 12:(12,"n2", 16);
    INSERT EDGE follow(degree) VALUES 11->12:(1);
  3. 查询
    match p=shortestPath((a:player{id:11})-[e:follow]-(b:player{id:12})) RETURN p UNION
    match p=shortestPath((a:player{id:11})-[e:follow]-(b:player{id:12})) RETURN p UNION
    match p=shortestPath((a:player{id:11})-[e:follow]-(b:player{id:12})) RETURN p UNION
    match p=shortestPath((a:player{id:11})-[e:follow]-(b:player{id:12})) RETURN p

Expected behavior

快速查询出这一条路径

Additional context

@zougn zougn added the type/bug Type: something is unexpected label Jan 8, 2025
@github-actions github-actions bot added affects/none PR/issue: this bug affects none version. severity/none Severity of bug labels Jan 8, 2025
@zougn zougn changed the title union 6 shortestPath match graphd connetc error union 4~6 shortestPath match graphd connetc error Jan 8, 2025
@zougn zougn changed the title union 4~6 shortestPath match graphd connetc error union 4~6 shortestPath match graphd connect error Jan 8, 2025
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