Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fetch plan for REST's '/command' and r7319 not working [moved] #1183

Closed
lvca opened this Issue Dec 10, 2012 · 7 comments

Comments

Projects
None yet
4 participants
Owner

lvca commented Dec 10, 2012

This is Issue 1183 moved from a Google Code project.
Added by 2012-11-25T09:16:26.000Z by infected...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium, v1.3.0

Original description

OrientDB release? 1.3.0-SNAPSHOT r7328

<b>What steps will reproduce the problem?</b>
1. Extract the attached database to OrientDB and start the server.
2. Send a simple '/command' using CURL over the REST protocol:
curl -X POST -u admin:admin 'http://localhost:2480/command/test/gremlin/100/*-1' -d 'm = [:];g.v('8:0').out('stream').groupBy(m){it.out('object').id}{it}.cap.iterate();m;'

3. Notice that an error is returned: java.lang.NumberFormatException: For input string: &quot;*-1&quot; due to inclusion of the fetch plan.

4. If we instead do this: 
curl -X POST -u admin:admin 'http://localhost:2480/command/test/gremlin/m+%3D+%5B%3A%5D%3B%0D%0A%0D%0Ag.v%28%278%3A0%27%29.out%28%27stream%27%29.groupBy%28m%29%7Bit.verb%7D%7Bit%7D.cap.iterate%28%29%3B%0D%0A%0D%0Am%3
B/100/*:-1'

Even with the fetch plan, we do not get the expanded records back:
{
   &quot;result&quot;:[
      {
         &quot;value&quot;:{
            &quot;post&quot;:[
               &quot;#8:6&quot;,
               &quot;#8:5&quot;,
               &quot;#8:4&quot;
            ],
            &quot;share&quot;:[
               &quot;#8:7&quot;
            ]
         }
      }
   ]
}

There also seems to be no way to provide no limit when using fetch plans.

This is a copy of the test database that was not migrated over from Google Code:

test.zip

Can this be tagged as 1.3.0?

Owner

lvca commented Dec 19, 2012

Postponed to 1.4, sorry.

Owner

lvca commented Jan 2, 2013

This isn't so easy to fix because current fetch plan acts when you're sending a record as first object. In this case you've first records nested inside the map/array/etc. and this would need a refactoring of current API.

Owner

lvca commented Jan 2, 2013

If this is a showstopper can you reload the record with a separate command? I know these are 2 calls instead of one. Otherwise you should return a flat result set of record without nesting.

F21 commented Jan 3, 2013

@lvca : Yup, I have refactor our side to walk through the results array and fetch them from the db. However, #1195 can't be worked around from the client side :(

@lvca lvca added the bug label Aug 28, 2014

@lvca lvca modified the milestones: 2.0rc1, 2.1 Aug 28, 2014

@lvca lvca modified the milestones: 2.1-rc1, 2.1-rc2 Apr 1, 2015

@lvca lvca removed the bug label Apr 8, 2015

@lvca lvca closed this Apr 14, 2015

Owner

lvca commented Apr 14, 2015

Not reproducible anymore

@lvca lvca modified the milestone: 2.1-rc2 Aug 5, 2017

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