Skip to content

Quotes are stripped out of arrays, possibly only in GraphML imports. #122

Closed

Description

@tetious

ArcadeDB Version: 21.10.2-SNAPSHOT (build ae608bf/1633588344745/main)

OS: docker

For this query:
MATCH (m:Movie{title:'The Polar Express'})<-[e:ACTED_IN]-(v:Person) RETURN e, v

Expected behavior

The edge property 'roles' should be a properly formed array, as is shown here from Neo4J's view of the import:
Screen Shot 2021-10-10 at 20 31 13

Actual behavior

The quotes are missing, making the array unparsable:
"roles": "[Hero Boy, Father, Conductor, Hobo, Scrooge, Santa Claus]"

I've confirmed arrays can be created and returned successfully via parameterized inserts, so I suspect this is a bug in the import code. Could be wrong, though!

Activity

  1. added this to the 21.10.2 milestone on Oct 11, 2021
  2. lvca commented on Oct 11, 2021

    @lvca
    Member

    @antarcticgiraffe could you please take this when you can? Thanks!

  3. lvca commented on Oct 13, 2021

    @lvca
    Member

    @tetious I tried with the latest release and it works:

    This is the edge returned in Studio:

    {
       "edges": [
          {
            "p": {
              "roles": [
                "Hero Boy",
                "Father",
                "Conductor",
                "Hobo",
                "Scrooge",
                "Santa Claus"
              ]
            },
            "r": "#54:20",
            "t": "ACTED_IN",
            "i": "#13:4",
            "o": "#34:7"
          }
        ]
    }

    Are you sure you're using the latest version? Try to remove the latest image from docker and run it again, so docker should download the latest.

  4. tetious commented on Oct 13, 2021

    @tetious
    ContributorAuthor

    I'm pretty sure I am. I just updated again, reimported like this:

    import database https://github.com/ArcadeData/arcadedb-datasets/raw/main/neo4j/movies.graphml.tgz

    And it is still a problem for me: (see version in the results)

        "edges": [
          {
            "p": {
              "roles": "[Hero Boy, Father, Conductor, Hobo, Scrooge, Santa Claus]"
            },
            "r": "#55:16",
            "t": "ACTED_IN",
            "i": "#1:3",
            "o": "#46:0"
          },
          {
            "p": {
              "roles": "[Hero Boy, Father, Conductor, Hobo, Scrooge, Santa Claus]"
            },
            "r": "#55:16",
            "t": "ACTED_IN",
            "i": "#1:3",
            "o": "#46:0"
          }
        ]
      },
      "user": "root",
      "version": "21.10.2-SNAPSHOT (build 2a5c3292c37bc9ba048e79e66956f178a0ecf1d5/1634079671040/main)"
    }
    

    Maybe we're using different datasets?

  5. lvca commented on Oct 13, 2021

    @lvca
    Member

    @tetious you're right, if I import the database from scratch I have the same issue. Checking into it. Thanks for the report.

  6. lvca commented on Oct 13, 2021

    @lvca
    Member

    Ok, seems the database exported and published has this issue: arrays are saved as strings (I suspect the Apache TinkerPop GraphML exporter has a bug where arrays are exported with a .toString().

  7. lvca commented on Oct 14, 2021

    @lvca
    Member

    Quick update. Written to the Discord channel of Gremlin. From the code, arrays/list/collections are saved as strings. The issue is that the GraphML Importer in Gremlin is unable to restore the original graph and the property is read as a string, confirming what you're experimenting with.

  8. lvca commented on Oct 14, 2021

    @lvca
    Member

    Fixed in the main branch by supporting GraphSON format that supports complex types, like arrays/collections/lists. We also have published this Movie database where you can import:

    import database https://github.com/ArcadeData/arcadedb-datasets/raw/main/neo4j/movies.graphson.tgz
  9. tetious commented on Oct 14, 2021

    @tetious
    ContributorAuthor

    Awesome! Thanks! I'll have a play once CD catches up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions