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

RepeatStep optimization looses label information. #92

Closed
pietermartin opened this issue Oct 26, 2016 · 0 comments
Closed

RepeatStep optimization looses label information. #92

pietermartin opened this issue Oct 26, 2016 · 0 comments
Assignees
Labels

Comments

@pietermartin
Copy link
Owner

The following code illustrates the problem.

    @Test
    public void testRepeatEmitLabel4() {
        loadModern();
        GraphTraversal<Vertex, Map<String, Vertex>> traversal = this.sqlgGraph.traversal()
                .V().as("a")
                .repeat(out()).times(1).emit().as("b")
                .select("a", "b");
        printTraversalForm(traversal);
        int count = 0;
        while (traversal.hasNext()) {
            Map<String, Vertex> vertexMap = traversal.next();
            System.out.println(vertexMap);
            count++;
        }
        System.out.println(count);
    }

The "b" label is being lost in the RepeatStep optimization.

@pietermartin pietermartin self-assigned this Oct 26, 2016
pietermartin pushed a commit that referenced this issue Oct 26, 2016
Add the `RepeatStep`s label to the `ReplacedStep`.
Complication however in `SqlgUtil.loadLabelledElements` to ensure only the emitted element uses the label and not all on the path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant