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

[#882] Separate csv metadata map by type #891

Merged
merged 8 commits into from Jul 19, 2018

Conversation

timo95
Copy link
Contributor

@timo95 timo95 commented Jul 17, 2018

A tuple of type and label is used as key in the metadata map to separate vertices and edges using the same label. Both Source and Sink failed/produced wrong results if edges and vertices use the same label.

Fixes #882

@galpha
Copy link
Contributor

galpha commented Jul 18, 2018

We just merged the PR fixing our licence block header. From /** to /*. Pls rebase your current branch and handle all local merge conflicts.

// The properties are incompatible to get a conversion error
// if the metadata is not separated
FlinkAsciiGraphLoader loader = getLoaderFromString(
"graph[" +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls add multiple entities with same label to test that case as well.
Your example Graph posted within your Issue #882 would fit.

test[
(v1:A {keya:1, keyb:2, keyc:\"Foo\"}),
(v2:A {keya:1.2f, keyb:\"Bar\", keyc:2.3f}),
(v3:A {keya:\"Bar\", keyb:true}),
(v1)-[e1:A {keya:14, keyb:3, keyc:\"Foo\"}]->(v1),
(v1)-[e2:a {keya:1.1f, keyb:\"Bar\", keyc:2.5f}]->(v1),
(v1)-[e3:a {keya:true, keyb:3.13f}]->(v1)
]
  • Multiple vertex entities with label 'A'
  • Multiple edge entities with label 'a'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with the test graph is it doesn't fail reliably. It only sometimes fails because edge e1 is compatible to the metadata of v:A but not the other way around. The 'e:a' edges don't have any 'v:a' vertices to collide with, only edge 'e1:A' conflicts with the vertices.

graph[
(v1:A {keya:true, keyb:1, keyc:\"Foo\"}),
(v2:A {keya:false, keyb:2.1f}),
(v3:B {keya:2.3f, keyb:\"Bar\"}),
(v4:B {keya:1.1d}),
(v1)-[e1:A {keya:1, keyb:\"Foo\", keyc:3.3d}]->(v2),
(v2)-[e2:A {keya:2, keyb:7.2d}]->(v1),
(v2)-[e3:B {keya:false}]->(v3),
(v3)-[e4:B {keya:true, keyb:13}]->(v4)
]

This should be guaranteed to fail on 'keya' with a conversion error and adds multiple entities.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allright, then use your proposed graph for testing.

// The properties are incompatible to get a conversion error
// if the metadata is not separated
FlinkAsciiGraphLoader loader = getLoaderFromString(
"graph[" +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

@galpha galpha merged commit 0f2cb47 into dbs-leipzig:master Jul 19, 2018
@timo95 timo95 deleted the 882-csv-label-bug branch July 19, 2018 06:29
0x002A pushed a commit to ChrizZz110/gradoop that referenced this pull request Feb 19, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants