question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable `.is(neq(' cypher.null'))` Gremlin token for Cyphter statements that contains `WITH` clause

See original GitHub issue

I have following Cyphter statement:

MATCH (n:`RepositoryArtifactIdGroup`)  
WHERE n.`uuid` = '364be4ec-6d2f-464a-bad0-1e0a65241cd5'  
WITH n 
MATCH (n)-[r_r1:`RepositoryArtifactIdGroupEntity_ArtifactGroupEntity`]->(a1:`ArtifactGroup`) 
WITH n, r_r1, a1 
RETURN n, r_r1, a1

This statement produce following Gremlin query:

g.V()
    .as('n')
    .hasLabel('RepositoryArtifactIdGroup')
    .has('uuid', eq('a707bad0-bb6a-4308-a7aa-f8d7b4f7cf2a'))
    .as('n')
    .is(neq('  cypher.null'))
    .outE('RepositoryArtifactIdGroupEntity_ArtifactGroupEntity')
    .as('r_r1')
    .inV()
    .as('a1')
    .hasLabel('ArtifactGroup')
    .select('n', 'r_r1', 'a1')
    .project('n', 'r_r1', 'a1')
    .by(__.select('n')).by(__.select('r_r1')).by(__.select('a1')).as('  GENERATED4')
    .select('n').as('n').select('  GENERATED4')
    .select('r_r1').as('r_r1')
    .select('  GENERATED4')
    .select('a1').as('a1')
    .select('n', 'r_r1', 'a1')
    .project('n', 'r_r1', 'a1')
    .by(__.select('n').valueMap().with('~tinkerpop.valueMap.tokens'))
    .by(__.select('r_r1')
    .project('  cypher.element', '  cypher.inv', '  cypher.outv')
    .by(__.valueMap()
    .with('~tinkerpop.valueMap.tokens'))
    .by(__.inV().id()
    ).by(__.outV().id()))
    .by(__.select('a1').valueMap().with('~tinkerpop.valueMap.tokens'))

There is also index on uuid property for RepositoryArtifactIdGroup vertex in JanusGraph, so I expect this query should trigger this index.

The problem is that for some reason index not triggered directly this way, but it works fine without .is(neq(' cypher.null')) token. I am not sure does it JanusGrapth issue or not but however it will be good to optionally disable this cypher.null to be generated.

Is it possible to have such option?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:3
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
carlspringcommented, Mar 18, 2020

Any updates on this? Please, advise!

1reaction
dwitrycommented, Mar 24, 2020

@sbespalov @steve-todorov This change requires either implementing optimization strategy or introduce an inlining option. Both of these changes require significant efforts in development and testing. Currently, all my attention is focused on other areas, and I can not provide any terms when this could be implemented. The best I can do is review and merge PR if there are any volunteers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with null - Cypher Manual - Neo4j
In Cypher, null is used to represent missing or undefined values. Conceptually, null means a missing unknown value and it is treated somewhat...
Read more >
Cypher Query Language Reference, Version 9 - Amazon S3
This document contains the complete reference for Version 9 of the Cypher ... example, the matching variables from one MATCH clause will be...
Read more >
TinkerPop Documentation
Retrieving this data is also a just writing a Gremlin statement: ... A toy graph demonstrating all of the new TinkerPop graph structure...
Read more >
Neo4j Cypher query with null or not null value - Stack Overflow
OUTGOING) private Decision owner; @Relationship(type = CONTAINS, direction = Relationship.OUTGOING) private Set<Criterion> criteria = new ...
Read more >
Gremlin statements in Neptune - AWS Documentation
For the Neptune property graph (PG) data, it is either unused (null graph) or it is used to represent the identifier for an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found