[ 
https://issues.apache.org/jira/browse/TINKERPOP-2432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17208247#comment-17208247
 ] 

Stephen Mallette edited comment on TINKERPOP-2432 at 10/5/20, 6:33 PM:
-----------------------------------------------------------------------

ah - i see what you're saying. to clarify this issue a bit, the problem appears 
to be with the `Bytecode#toString()` representation not the bytecode itself nor 
with the Translator. if there were a problem with the bytecode itself we'd have 
a gang of failing tests as there are tons of tests with child traversals. 
thanks for re-opening this.

do you intend to supply a pull request to fix this issue [~serguk86] ?


was (Author: spmallette):
ah - i see what you're saying. to clarify this issue a bit, the problem appears 
to be with the `Bytecode#toString()` representation not the bytecode itself nor 
with the Translator. if there were a problem with the bytecode itself we'd have 
a gang of failing tests as there are tons of tests with child traversals. 
thanks for re-opening this.

> Generate correct toString() representation of bytecode in Javascript
> --------------------------------------------------------------------
>
>                 Key: TINKERPOP-2432
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2432
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: javascript
>    Affects Versions: 3.4.8
>            Reporter: Serg Salo
>            Priority: Minor
>
> I have a very simple task - generate bytecode using typescript traversal. 
> for example: 
> const g = new Graph().traversal();
> const q = g.V().hasLabel("airport").where(__.outE("route").hasId(7753));
> const query = new translator("g" as any);
> const bytecode = q.getBytecode();
> console.log(`Bytecode: ${bytecode.toString()}`);
>  
> Here is what is generated: 
>  
> Bytecode: 
> [["V"],["hasLabel","airport"],["where",\{"graph":null,"traversalStrategies":null,"bytecode":{"sourceInstructions":[],"stepInstructions":[["outE","route"],["hasId",7753]]},"traversers":null,"sideEffects":null,"_traversalStrategiesPromise":null,"_traversersIteratorIndex":0}]]
>  
> Looks like it does the first level serialization correct, but the second 
> level isn't properly serialized. 
>  
> any suggestions what is wrong with this code?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to