Closed Jeremy-zgp closed 5 years ago
Hello @Jeremy-zgp ,
to match Cypher behavior and return data in a table format, translated query is a little different from Gremlin you directly typing in console.
match (n) return n
is translated to g.V().project('n').by(valueMap().with(tokens))
which returns table with properties for each vertex.
It is different from g.V()
which return Gremlin objects depending on database implementation and configuration and can return DetachedVertex
(which may not contain properties at all).
As you mentioned, as the data size is large, additional steps will take additional resources, that's why you are getting a warning.
Hello @dwitry
thanks for your answer, but once I get the warning, I can't use the console anymore and I have to restart. I want to know if there are some ways to solve this problem.
Hello @Jeremy-zgp,
can you clarify which Gremlin implementation (including version) are you using?
org.apache.tinkerpop.gremlin.driver.client.submit(final String gremlin, final Map<String, Object> parameters)
, the version is 3.3. As your answer mentioned, if I commit g.V().project('n').by(valueMap().with(tokens))
, I can still get response, but match (n) return n
can't.
In fact, they are totally same , but I don't know why the results are different. So I guess if there are some problems with CypherResult in dealing with gremlin ResultSet. Thank you
Case you are describing sounds strange. It might be related to issues with earlier versions of TinkerPop.
Can you please provide:
match (n) return n
Is it possible for you to test this case with latest versions of both?
Hello @dwitry
Cypher for Gremlin version is 0.9.12, buf for CypherResultSet, I think there are no differences with the latest version.
I use Tinkerpop which the version is 3.3.1.
Iterator<Map<String, Object>> resultSet = cypherGremlinClient.submit(cypher, parameters).iterator();
I passed the cypher as one parameter, and got a iterator.
Another thing I want to point out is I used the latest TinkerPop, but it was same. I haven't used the latest cypher-for-gremlin to test. Thanks again for your reply
Hello @dwitry After my tests, maybe it's not caused by CypherResult. I am still scouting the root of this problem. I'm sorry for bothering you, thank you.
Hello @Jeremy-zgp I am facing an issue something similar to yours. https://github.com/opencypher/cypher-for-gremlin/issues/315
Did you find any answer?
Closing issue after a week of inactivity. Don't hesitate to open a new issue if you have any more questions.
try to query results with using like "match (n) return n",if the size of data is pretty large,gremlin server will have a warning,
Pausing response writing as writeBufferHighWaterMark exceeded on
and gremlin console will not respond. But for the same data, I use "g.V()" and console can respond after a period. I guess maybe there are some issues about CypherResult, I'm not sure. I need help, thank you