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

ClassCastException in SqlgTraversalFilterStepBarrier #272

Closed
jgustie opened this issue Mar 6, 2018 · 0 comments
Closed

ClassCastException in SqlgTraversalFilterStepBarrier #272

jgustie opened this issue Mar 6, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@jgustie
Copy link
Contributor

jgustie commented Mar 6, 2018

The following sample fails with a CCE (LP_O_OB_P_S_SE_SL_Traverser to SqlgTraverser):

        Graph graph = ...
        graph.addVertex("category", "a", "name", "hello");
        graph.addVertex("category", "b", "name", "ignore");
        graph.addVertex("category", "a", "name", "world");

        GraphTraversalSource g = graph.traversal();
        g.V().group().by("category")
                .unfold()
                .where(select(values).count(local).is(gt(1)))
                .select(values)
                .unfold()
                .values("name")
                .forEachRemaining(System.out::println);

It will run as expected (prints "hello\nworld") when using .withoutStrategies(SqlgTraversalFilterStepStrategy.class).

The part that fails is the cast to call setRequiresOneBulk(true). I'm not going to pretend like I understand what is going on here, just going to be a messenger on this one :)

@pietermartin pietermartin added this to the 1.5.1 milestone Mar 6, 2018
@pietermartin pietermartin self-assigned this Mar 17, 2018
pietermartin added a commit that referenced this issue Mar 17, 2018
pietermartin added a commit that referenced this issue Mar 17, 2018
The fix is a bit of a hack in that TinkerPop's `ReducingBarrierStep`
creates new traversers.
Sqlg needs to replace all `ReducingBarrierStep`s with its own steps to
be in charge of the traverser creation.
This is an outstanding //TODO as it will add optimization to all
`group by` type queries.
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

2 participants