morpheus icon indicating copy to clipboard operation
morpheus copied to clipboard

Get/Print the Cypher query AST in Morpheus

Open MohamedRagabAnas opened this issue 4 years ago • 1 comments

Hello, I'm asking is there a way to get/print the AST of the passed cypher query in Morpheus as a string or an object.

Thanks in advance for your reply!

MohamedRagabAnas avatar Apr 23 '20 04:04 MohamedRagabAnas

Hi Mohammed, there are different system properties that can be set to pretty print intermediate stages of the query execution. For example:

ir.explainIr
morpheus.explain
cora.explainRelational
cora.explainOptimizedRelational

Named very inconsistently tbh ..

I think there is no flag to print the AST, if you just want a string representation, you could output the statement in org/opencypher/okapi/relational/api/graph/RelationalCypherSession.scala:146.

s1ck avatar May 06 '20 06:05 s1ck