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

Missing vertex properties in match result #4954

Closed
nebula-bots opened this issue Nov 29, 2022 · 0 comments · Fixed by #5106
Closed

Missing vertex properties in match result #4954

nebula-bots opened this issue Nov 29, 2022 · 0 comments · Fixed by #5106
Assignees
Labels
affects/master PR/issue: this bug affects master version. auto-sync find/automation process/done Process of bug severity/major Severity of bug type/bug/correctness Query runs normaly but produces wrong results. type/bug Type: something is unexpected
Milestone

Comments

@nebula-bots
Copy link
Contributor

Please check the FAQ documentation before raising an issue

Describe the bug (required)

Fuzzer generate a semantic equivalent match clause for both Nebula and Neo4j, and we found that vertex properties are missing in the result of Nebula comparing to Neo4j:

Execution in Neo4j:

match (v:ID)-[]->(e) where v.id = 1  return count(v), v
╒══════════╤══════════════════════════════════════════════════════════════════════╕
│"count(v)"│"v"                                                                   │
╞══════════╪══════════════════════════════════════════════════════════════════════╡
│9         │{"labelProp_5_1":0.845833,"labelProp_3_3":true,"labelProp_4_2":2,"labe│
│          │lProp_5_0":0.026265,"labelProp_3_2":"Tracy McGrady","labelProp_4_1":12│
│          │6,"labelProp_3_1":"Tiago Splitter","labelProp_4_0":false,"labelProp_3_│
│          │0":97,"labelProp_2_1":false,"labelProp_2_0":"LaMarcus Aldridge","label│
│          │Prop_1_0":191,"id":1,"labelProp_7_3":true,"labelProp_7_2":0.592624,"la│
│          │belProp_7_1":"Dejounte Murray","labelProp_5_3":false,"labelProp_7_0":0│
│          │.247467,"labelProp_5_2":0.249693}                                     │
└──────────┴──────────────────────────────────────────────────────────────────────┘

In Nebula:

(root@nebula) [testdb]> match (v)-[]->(e) where id(v) == 1 return count(v), v
+----------+-----+
| count(v) | v   |
+----------+-----+
| 9        | (1) |
+----------+-----+
Got 1 rows (time spent 2287/2617 us)

Thu, 27 Oct 2022 09:37:21 CST

(root@nebula) [testdb]>

We can see that Nebula return only the vid, the tags and tag properties are missing.
Note that we ues a Label ID(id: int) in Neo4j to simulate vertex id in Nebula.

running a brief unit test also verify that the properties are missing in Nebula's execution result:

func TestCount(t *testing.T) {
	runInGraphSession(func(session *nebula.Session) {
		rs := gonebula.MustExecute(session, "use testdb; match (v)-[]->(e) where id(v) == 1 return count(v), v;")
		row := rs.GetRows()[0]
		t.Logf("count: %d, vertex: %+v", *row.Values[0].IVal, *row.Values[1].VVal)
	})
}

% go test -run=TestCount -v 
=== RUN   TestCount
    ng_graph_test.go:57: count: 9, vertex: {Vid:Value({NVal:<nil> BVal:<nil> IVal:1 FVal:<nil> SVal:[] DVal:<nil> TVal:<nil> DtVal:<nil> VVal:<nil> EVal:<nil> PVal:<nil> LVal:<nil> MVal:<nil> UVal:<nil> GVal:<nil> GgVal:<nil> DuVal:<nil>}) Tags:[]}
--- PASS: TestCount (0.19s)
PASS
ok      github.com/kikimo/ngql-fuzzer/pkg/graph 0.613s

Your Environments (required)

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

How To Reproduce(required)

Steps to reproduce the behavior:

  1. Step 1
  2. Step 2
  3. Step 3

Expected behavior

Additional context

@nebula-bots nebula-bots added affects/master PR/issue: this bug affects master version. auto-sync find/automation severity/major Severity of bug type/bug Type: something is unexpected type/bug/correctness Query runs normaly but produces wrong results. feature/none labels Nov 29, 2022
@github-actions github-actions bot removed the type/bug Type: something is unexpected label Nov 29, 2022
@codesigner codesigner self-assigned this Nov 29, 2022
@Sophie-Xie Sophie-Xie added this to the v3.4.0 milestone Nov 29, 2022
@Sophie-Xie Sophie-Xie added the type/bug Type: something is unexpected label Dec 16, 2022
@Sophie-Xie Sophie-Xie assigned nevermore3 and unassigned codesigner Dec 22, 2022
@github-actions github-actions bot added the process/fixed Process of bug label Dec 27, 2022
@HarrisChu HarrisChu added the process/done Process of bug label Jan 9, 2023
@github-actions github-actions bot removed the process/fixed Process of bug label Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/master PR/issue: this bug affects master version. auto-sync find/automation process/done Process of bug severity/major Severity of bug type/bug/correctness Query runs normaly but produces wrong results. type/bug Type: something is unexpected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants